0
Dans un référentiel, j'ai besoin de rechercher les caractéristiques d'un contact (c) pour une collection d'autres caractéristiques définies dans un searchCriteria (sc). L'expression Func ressemble à ceci:linq aux entités: imbriqué .Any()
// no Problem from here --->
c => c.firstName.StartsWith(sc.FirstName)
&& c.lastName.StartsWith(sc.LastName)
&& c.addressData.Any(a => a.City.StartsWith(sc.City))
&& c.addressData.Any(a => a.StreetAddr.StartsWith(sc.Street))
&& c.addressData.Any(a => a.ZIPCode.StartsWith(sc.ZipCode))
&& c.visit.Any(v=> v.vStartDate >= sc.VisitTimeIntervalStart)
&& c.visit.Any(v => v.vStartDate <= sc.VisitTimeIntervalEnd)
// <-- to here but this ->
&& c.contact2feature.Any(
c2f => sc.FeaturePattern.Any(
` fp => fp.Item1.featureID == c2f.feature.featureID))
// thows: System.Reflection.TargetInvocationException
// Inner: Unable to process the type System.Tuple 2[], because it has no known mapping to the value layer.
** Vous vous sentez courageux de faire de telles choses avec EF? ;) –