title: Entities may have been modified or deleted since entities were loaded
body: <p>I’m executing the code in their own contexts, but it’s causing data to be out of sync in the main threads context.  So I need to refresh the entity after the other contexts finish their work before I can update it. </p>
  
  <p>Unfortunately, I’m getting a OptimisticConcurrencyException and can’t figure out which entity it is that is the issue and needs to be refreshed? Is there a way to find out which entity it is that is causing the OptimisticConcurrencyException?  This message is not helpful at all…</p>
  
  <blockquote>
    <p>System.Data.Entity.Infrastructure.DbUpdateConcurrencyException: Store
    update, insert, or delete statement affected an unexpected number of
    rows (0). Entities may have been modified or deleted since entities
    were loaded. Refresh ObjectStateManager entries. --->
    System.Data.OptimisticConcurrencyException: Store update, insert, or
    delete statement affected an unexpected number of rows (0). Entities
    may have been modified or deleted since entities were loaded. Refresh
    ObjectStateManager entries.</p>
  </blockquote>