The following code works:
var dataCollection = Db.GetCollection<User>("User"); var results = dataCollection.AsQueryable().Where(p => p.Id == userId);
but it doesn't work if you do it like this:
var dataCollection = Db.GetCollection<User>("User"); var query = dataCollection.AsQueryable(); query.Where(p => p.Firstname == "Tom"); query.Where(p => p.Lastname == "Smith");
it seems if its not part of the original variable, then mongo LINQ will totally ignore it