I am trying to implement what I thought was a simple scenario using an OData service provided by WCF Data services (using the OData V3 application/json;odata=verbose payload
You don't need a batch, anymore. You can do it in one call. You simply need to also send up the changed properties and let the repository handle the changed properties.
public class Person
{
public string FirstName {get;set;}
public string LastName {get;set;}
public int Age {get;set;}
}
Let's say you notice the first name has a typo, Jhon and it is supposed to be John. You can edit the first name and send it up. So you have the following object model. You can get this in 1 of two ways:
BodyStyle = WebMessageBodyStyle.WrappedSo you would send up this json:
[{ FirstName = 'John' }, ['FirstName']]
Now on the server side, you can do what you need to do.
If you don't want to send the changed properties, you can guess the changed properties by choosing any property whose value isn't the default property.
{ FirstName = 'John' }
Then you can use a few methods to see what properties have changed: