title: How to PATCH in Web API and OData
body: <p>From reading the <a href="https://www.rfc-editor.org/rfc/rfc5789" rel="nofollow noreferrer">RFC specification of the Patch verb</a> it's clear that the <code>Patch</code> verb shouldn't get values to partially update the entity but operations to make:</p>
  <blockquote>
  <p>...With PATCH, however, the enclosed entity contains a set
  of instructions describing how a resource currently residing on the
  origin server should be modified to produce a new version.</p>
  </blockquote>
  <p>In MSDN for the Delta class it's also clear, as the <a href="http://msdn.microsoft.com/en-us/library/jj890126(v=vs.118).aspx" rel="nofollow noreferrer">Patch</a> description says:</p>
  <blockquote>
  <p>Overwrites the original entity with the <strong>changes tracked</strong> by this Delta.</p>
  </blockquote>
  <p>Unlike the description of <a href="http://msdn.microsoft.com/en-us/library/jj890124(v=vs.118).aspx" rel="nofollow noreferrer">Put</a>:</p>
  <blockquote>
  <p>Overwrites the original entity with the <strong>values</strong> stored in this Delta.</p>
  </blockquote>
  <p>So far so good, but I couldn't find a way to send those &quot;instructions&quot; with OData, No matter what I do, Delta.Patch only replaces the values.</p>
  <p>What should be the syntax of Patch request?</p>
  <p>The ways I tried were:</p>
  <pre><code>PATCH http://localhost:55783/Products(1) HTTP/1.1
  User-Agent: Fiddler
  Host: localhost:55783
  Content-Length: 19
  Content-type: application/json
  
  { &quot;Price&quot;: 432 }
  </code></pre>
  <p>And</p>
  <pre><code>{ &quot;op&quot;: &quot;add&quot;, &quot;path&quot;: &quot;/Price&quot;, &quot;value&quot;: 423432 }
  </code></pre>
  <p>And stuff near that.</p>
  <hr />
  <p><strong>Update:</strong></p>
  <p>Thanks to Michael Moore and from reading the whole Delta class with ILSpy I think it's indeed a bug in the Patch verb design.<br />
  <a href="https://connect.microsoft.com/VisualStudio/feedbackdetail/view/961798" rel="nofollow noreferrer">I opened a bug for Microsoft, you can vote on it if you need it to be fixed too.</a></p>