I have some object with EntityCollection inside. If I just add the new entity everything works good. The code that does it here:
Context.ApplyChanges()
Context.SaveChanges()
But if I try to update the entity I have the following message:
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.
Even if use the same collection objects. I mean there can not be real the same entity objects in the collection because are saved into database if they are new. But! If I try to apply the same code to the separate entities into collection they are saved but again if I try to apply it on the object (container) I have this error.
Thanks for the help