Patch REST API to Partial Update MongoDB in .NET
I have an object { "_id": "testobject", "A": "First line", "B": "Second line", "C": "Third line" } I want to send a REST PATCH request to my API to only update one of these properties { "_id": "testobject", "C": "Forth line" } This gets parsed into a class public class SomeObject { public string A { get; set; } public string B { get; set; } public string C { get; set; } } I now need to update the existing document in MongoDB but only updating the property C . I could create an update definition just for this one record UpdateDefinition<SomeObject> update = Builders<SomeObject>.Update.Set(x =>