How can I rewrite the following old code through the new C # MongoDb driver, which uses the 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 an Update operation with the Builder mechanism is clear to me, but how to perform a bulk update operation?
Vladislav Furdak
source share