MongoDB C# Driver 2.0 – Update document
I think you’re looking for ReplaceOneAsync(): MyType myObject; // passed in var filter = Builders<MyType>.Filter.Eq(s => s.Id, id); var result = await collection.ReplaceOneAsync(filter, myObject)
I think you’re looking for ReplaceOneAsync(): MyType myObject; // passed in var filter = Builders<MyType>.Filter.Eq(s => s.Id, id); var result = await collection.ReplaceOneAsync(filter, myObject)
This post may help: I figured it out. This JIRA ticket has the details. Effectively, we’ve made a distinction between connecting to a standalone server and connecting directly to a replica set member, where the latter is relatively uncommon. Unfortunately, MongoLab’s Single-Node settings are actually a single node replica set and this causes us to … Read more