开发者

Creating a new resource initiates a POST request which initializes all properties

I'm consuming a set of data services with the help of a service reference and using the call

svc.AddToXXX(new XXX() {//some properties})

to create a new resource of type XXX. Ho开发者_StackOverflowwever unlike the update resource call, which uses a MERGE request, this results in a POST request which ends up initializing all unspecified properties with their default value. Is there a way to force it to only initialize the specified properties?


We discussed this a bit more on MSDN forums and the full resolution can be found here: http://social.msdn.microsoft.com/Forums/en-US/adodotnetdataservices/thread/9284cb7c-46d9-4495-84ec-875e21af56fb/ In short, WCF Data Service client doesn't support property level tracking, it only tracks changes on the entire entity. In order to support the scenario from this question, property level tracking needs to be added. It is possible to do this in code above WCF Data Services, but it's not exactly easy.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜