I'm trying to create a complex query expression with the MongoDb C# driver. So far I've mostly relied on the LINQ .AsQueryable() features which work great, but now I need to run some update operations and it looks like I need to use the QueryBuilder for that.
However, I can't figure out how to create a complex query that strings multiple query operators together.
I'd like to do something like this:
var query = Query<QueueMessageItem>
.EQ( qi => qi.Type, queueName)
.EQ("Started", null);
but apparently this doesn't work because .EQ() and all the other query operators don't return a chainable Query object.
How do I use Queries and add multiple search operators?
Query.Or(Query.EQ("t", "F"), Query.EQ("t", "M")))?