I have this query in mongodb:
db.getCollection('emails').find({"to.address": {$in:['[email protected]']}})
I have to convert it into C# code. I've searched a lot already and nothing seems to fit my needs.
I even did an elem match:
MongoCursor<Email> csr = ConnectionHandler.Collection.Find(Query<Email>.ElemMatch(t => t.to(Query<Email.Address>).In(a => a.address, emails)));
This is what I've come up with in C# so far:
var emails = emailAddresses.Select(e => e.emailAddress);
MongoCursor<Email> csr = ConnectionHandler.Collection.Find(Query<Email>.EQ("to.address", (Query<Email.Address>.In()));
It's incomplete. and obviously not close to the right solution.
Hope someone can help!
Thanks!