Optimization - does this work? RRS feed

All replies

  • The WCF Data Services client does include all of the properties of an entity that it knows about in the payload of a MERGE request, even if those properties have not changed. While this may seem surprising, the client currently doesn't have a mechanism to track entity changes at the property level. (The main difference between MERGE and PUT is that because a PUT is essentially an entity replace, any property values that the client doesn't know about are reset to their default values.)

    I have not tried the solution proposed above, but because removing unchanged properties from a MERGE request still leaves an OData-compliant request, it should work. This is certainly a bit of extra work, but it would enable you to reduce the XML payload of a MERGE request.

    I didn't see property-level change tracking in the current list of feature requests, but it might be worth requesting.


    Glenn Gailey

     p.s. I also discuss this issue in the blog post MERGE Requests and the WCF Data Services Client.

    This posting is provided "AS IS" with no warranties, and confers no rights.
    Saturday, January 29, 2011 9:38 AM
  • Thanks Glenn. I have just added it to the list of requested features.
    Monday, January 31, 2011 7:43 PM