I want to query my MongoDB collection without any filter with MongoDB .NET Driver 2.0 but I didn't find a way. I have the following workaround but it looks weird :D
var filter = Builders<FooBar>.Filter.Exists(x => x.Id);
var fooBars = await _fooBarCollection.Find(filter)
.Skip(0)
.Limit(100)
.ToListAsync();
Is there a way to issue queries without a filter in MongoDB .NET Driver 2.0?
.Find()
without a "filter"? That means all to most of us. Otherwise just:new BsonDocument()
– Oleomargarine