score:93

Accepted answer

are you trying to get a list of objectbs where all of the objectas are in listofidsa, or any of them?

i think you want either:

listobjectb.where(p => p.listofobjecta.any(x => listofidsa.contains(x.id)))

or

listobjectb.where(p => p.listofobjecta.all(x => listofidsa.contains(x.id)))

(you may well want to make listofidsa a hashset<string> if it's of significant size, btw.)


Related Query

More Query from same tag