How can i rewrite the following old code via the new C# MongoDb driver which using IMongoCollection
interface :
var bulk = dbCollection.InitializeUnorderedBulkOperation();
foreach (var profile in profiles)
{
bulk.Find(Query.EQ("_id",profile.ID)).Upsert().Update(Update.Set("isDeleted", true));
}
bulk.Execute();
How to create Update
operation with Builder
mechanism is clear for me, but how to perform update bulk operation ?