title: Entity Framework detect changes before SaveChanges
body: <p>I have a Web API that uses Entity Framework and an Angular SPA. I get an entity and pass it to the SPA, but then I get a DTO back from the SPA into my API. Now what is the best way to check to see if the data has changed by someone else?</p>
  
  <p>One possible scenario is to send the original entity along with the modified entity and do a select by the columns I am modifying. If no rows are returned then the data has changed. This might work, but I wanted to see if there is a better way of detecting changes; especially in the case that the data itself is not in an entity but in a DTO.</p>
  
  <p>Thanks.</p>