simple-odata-client / Simple.OData.Client

MIT License
329 stars 196 forks source link

JsonPatchDocument support? #746

Open hippiehunter opened 4 years ago

hippiehunter commented 4 years ago

I don't currently see a way to send a patch request formatted as a JsonPatchDocument. If I construct the JsonPatchDocument myself and pass it to .Set()

var jpatch = new JsonPatchDocument();
jpatch.Replace("MyFieldName", "newValue");
oDataClient.For("Mycollection")
           .Key("keyValue")
           .Set(jpatch) 
           .UpdateEntryAsync().Result;

I get an exception complaining about "Operations" not being part of the collection type.

Is there a different way to do this and if not, would you be open to a PR?

rahul7720 commented 2 years ago

Any updates on this issue?