I have the following issue - how to check is there are any element from int
array mailListIds
contains in MailLists
in MailListId
field. I think it could be something like the following :
Builders<Profile>.Filter.AnyIn(p => p.MailLists.Select(m => m.MailListId), mailListIds)
But that code cannot be serialized into query. How to implement it ?
I've solved the problem by the following way :
Builders<Profile>.Filter.Where(p => p.MailLists.Any(b => mailListIds.Contains(b.MailListId)))