I have the following data structure:
{
eventname: "blah",
invitees: [
{
inviteid: 1,
userid: 34234
},
{
inviteid: 2,
userid: 5232
}]
}
I am going to use ensureIndex on my invitees column so i do not have to search through every document to find specific userids in the invitees column. Its basically searching for events that a specific userid was invited to. I was suggested to use this db.events.find({"invitees.userid" : 34234}) to query it, but how do i do this in c# with then 10gen driver. the .find method only accepts a Mongo Query object.