What is the correct way to call patch from an OData client in Web Api 2

后端 未结 1 856
太阳男子
太阳男子 2021-02-20 12:20

Following the OData samples created by the web api team, my controller has the following for supporting Patch:

public HttpResponseMessage Patch([FromODataUri] in         


        
1条回答
  •  有刺的猬
    2021-02-20 12:45

    The client side property tracking is now supported from Microsoft.OData.Client version 6.2.0. It will detect only the modified properties of an entity and send the update request as PATCH instead of PUT to meet the requirement of your scenario. Please refer to this blog post for more details: http://blogs.msdn.com/b/odatateam/archive/2014/04/10/client-property-tracking-for-patch.aspx

    0 讨论(0)
提交回复
热议问题