title: Lock database row on Read with Entity Framework Core
body: <p>How is it possible to lock a row on read with EF Core? I found an easy solution using <code>TransactionScope</code>'s but they don't seem to work (class not found)</p>
  
  <p>The problem is when deleting an item, which I do in a thread, and press the delete button twice, the item isn't there the second time, so I get an exception.</p>
  
  <p>My first solution was to check if the item is still there, but as method is called as task, the check is performed by both tasks before either of them deletes it. So I would need to lock this row to block the second task from producing an error. </p>
  
  <p>A quick-n-dirty solution would of course be try with empty catch, but I would prefer to handle this in a clean way.</p>