I\'m having trouble figuring out syntax for what I\'m trying to accomplish. As stated I\'m using the C# driver for MongoDB.
I have a User entity defined as
You can use Query.And()
like this...
var entityQuery = Query.And(
Query.EQ(e => e.Username, username.ToUpper()),
Query.EQ(e => e.Password, password)
);
See CSharp Driver Tutorial
Or you could do it LINQ style, see: CSharp Driver LINQ Tutorial
This is also interesting too: How to rewrite a MongoDB C# LINQ with a Projection Requirement using a MongoCursor