You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I'm migrating our project from EF 6 to Ef.Core. We've used GraphDiff library to update the whole entity graph in disconnected scenarios (it's a web app), it's really good, but not supported in EF.Core.
As many developers, we faced with this annoying error "the instance of entity type cannot be tracked because another instance with the key value is already being tracked" on updating entities. I understand that this entity is already being tracked by EF Core, but is any reasons throwing exception instead of updating the entity in internal dictionary or removing from it? It's even really hard to detect where the entity was previously loaded and I think it should be implemented in EF Core, not any workaround in end developers code to detect this. It's an ORM framework and it should hide all complexity from developers.
The text was updated successfully, but these errors were encountered:
I have found now it's possible to make own IIdentityResolutionInterceptor and built-in UpdatingIdentityResolutionInterceptor can be used to always update values
Hi, I'm migrating our project from EF 6 to Ef.Core. We've used GraphDiff library to update the whole entity graph in disconnected scenarios (it's a web app), it's really good, but not supported in EF.Core.
As many developers, we faced with this annoying error "the instance of entity type cannot be tracked because another instance with the key value is already being tracked" on updating entities. I understand that this entity is already being tracked by EF Core, but is any reasons throwing exception instead of updating the entity in internal dictionary or removing from it? It's even really hard to detect where the entity was previously loaded and I think it should be implemented in EF Core, not any workaround in end developers code to detect this. It's an ORM framework and it should hide all complexity from developers.
The text was updated successfully, but these errors were encountered: