I have the below code and I am new to mongodb, I need help in finding an specific element in the collection.
using MongoDB.Bson; using MongoDB.Driver; namesp
It also Varies according to the .Net framework version we are using. If we Use 2x driver it should look like :
var list = await collection.Find(new BsonDocument()).ToListAsync();
method 2
await collection.Find(new BsonDocument()).ForEachAsync(X=>Console.WriteLine(X));
Reference Example