UpdateOneAsync is used in .net 4.5
and later versions for updating one record in MongoDB. Even if your selecting
matches multiple records it will update only first record of the data.
Example:
var updoneresult = await
collection.UpdateOneAsync(
Builders<BsonDocument>.Filter.Eq("MasterID", 10),
Builders<BsonDocument>.Update.Set("MasterID", 11));
2 Comments
like Eq("MasterID", 10) i have two condition to check . so what shoud i write
ReplyDeleteFilter.In
Delete