The instance of entity type 'XXXX' cannot be tracked because another instance with the key value 'XXX' is already being tracked. When attaching existing entities, ensure that only one entity instance with a given key value is attached. #33629
Labels
I'm getting that particular issue trying to update an entity.
I try to add .UseQueryTrackingBehavior(QueryTrackingBehavior.NoTracking) in DataContext but didn't work.
Also do same thing in Repository class. My can update the record the 1st time, but, if I want to perform anothe modification for same entity I got that error.
In other to analyze the issue, I create a WPF solution with same issue but, in this case, Im having the problem the 1st time trying to update:
EFCore.zip
The text was updated successfully, but these errors were encountered: