title: Can an entity be unloaded from entity framework's ObjectStateManager?
body: <p>I am using Entity Framework with Self-Tracking Entities over WCF. </p>
  
  <p>I have 2 entities, Customer and PriceMatrix with a many-to-many relationship (the customer can have many historic price matrices, and a matrix can be shared between a group of customers)</p>
  
  <p>The client has a single PriceMatrix which it updates and sends back to the server. The server needs to check if this PriceMatrix is shared among other customers before choosing to either update it, or duplicate it and update the duplicate.</p>
  
  <p>The problem I have is that because I am loading the PriceMatrix to examine it before I attach the updated PriceMatrix I am getting the following error when I call ApplyChanges().</p>
  
  <blockquote>
  "AcceptChanges cannot continue because the object's key values conflict with another object in the ObjectStateManager. Make sure that the key values are unique before calling AcceptChanges."
  </blockquote>
  
  <p>If I comment out my checks (and consequently don't load the PriceMatrix) everything works fine.</p>
  
  <p>What I really want to do is, after examining its state, unload the PriceMatrix and then attach the updated PriceMatrix I received from the client.</p>