DeleteManyAsync() in C# with Example

DeleteManyAsync is used in .Net 4.5 and later versions for deleting one or more number of records in MongoDB by using C# driver 2.0, we should add MongoDB reference for the working solution.

Find the example below, Deleting Multiple data from MongoDB document with the records having 'MasterID' less than 1000

var results = await collection.DeleteManyAsync(
                  Builders<BsonDocument>.Filter.Lt("MasterID", 1000));