title: Concurrency when deleting object in Entity Framework
body: <p>I'm developing a web app using the entity framework.  I load a list of objects and bind it to a repeater to show a summary of all the items.  The user may click an edit icon or a delete icon for each item in the repeater.  </p>
  
  <p>Example:</p>
  
  <p>Item 1 | Edit | Delete</p>
  
  <p>Item 2 | Edit | Delete</p>
  
  <p>...</p>
  
  <p>Editing works fine when using a rowversion column for concurrency because the record is loaded and the values for the ID and rowversion column are persisted in hidden form fields.  These "original" values are then available to use later when doing the update.</p>
  
  <p>However, if the user clicks Delete for a record, I load the object from the database, call DeleteObject(), then call SaveChanges().  The problem with this is that when I load the record, it gets the latest rowversion value, so any concurrency checking is rendered useless.  </p>
  
  <p>How can I ensure that concurrency checking takes place when deleting a record?</p>