And operator in MongoDB to perform query with multi-filters using the official .NET driver - cSharp Coder

Latest

cSharp Coder

Sharp Future

Wednesday, May 19, 2021

And operator in MongoDB to perform query with multi-filters using the official .NET driver

 You can simply do:

      var Collection = database.GetCollection<Mongo_Class>("documentname");

                var filter = Builders<Mongo_Class>.Filter.Eq("Id", Value) & Builders<Mongo_Class>.Filter.Eq("name", value);

                var FilterList = Collection.Find(filter).ToList();



No comments:

Post a Comment