How to update a set of entities?
Say I have resource A that contains a navigation property called "Bs" that points to a set of resource B. Given an instance of resource A, can I batch update the set of resource B through the navigation prop开发者_Python百科erty of resource A?
I know that I can update a single instance of B by doing a PUT/MERGE to /A(0)/B(1). But can I do a PUT/MERGE with an array of updated values in my request body to /A(0)/B?
You can use batch request to perform multiple updates in one go. See http://www.odata.org/developers/protocols/batch for the protocol, description. The WCF DS client library has built-in support for batch request. Other client libraries might have it as well.
精彩评论