The specified entity cannot be detached from the ObjectSet because the entity is a member of the EntitySet '{0}.{1}' instead ...

The specified entity cannot be detached from the ObjectSet because the entity is a member of the EntitySet '{0}.{1}' instead of the EntitySet '{2}.{3}' that is referenced by the ObjectSet. Use the Detach method on the ObjectSet that contains the entity, or use the ObjectContext.Detach method if you want to delete the entity without validating its EntitySet.