title: How to update row with concurrency control using EF Core?
body: <p>I've a table &quot;Orders&quot; with columns: &quot;Id&quot;, &quot;ProductId&quot;, &quot;Status&quot;, &quot;Version&quot;.</p>
  <p>&quot;Version&quot; is incremented with 1 after every changing of the row.
  This column is for control concurrency of several users changes.</p>
  <p>For example, I read an order with Id=3 and Version=7. When I update it, I must be sure that nobody has changed this row yet.
  By SQL, I would write such script:</p>
  <pre><code>UPDATE Orders
  SET Status = 'completed', Version = Version + 1
  WHERE Id = 3 AND Version = 7
  </code></pre>
  <p>How can I write the same code by EF Core without using SQL command?</p>