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
Attach an entity to the context with a known primary key specified (Id > 0)
Extend entity graph by adding/associating another entity with an Id > 0
Trigger DetectChanges for ex; invoke context.ChangeTracker.Entries().
You will find the new entity (which was not explicitly attached) being tracked.
It's state however is incorrectly tracked as "Added" and not "Unchanged".
If the new entity were to be attached via context.Attach, its state is correctly determined.
Scenario -
You will find the new entity (which was not explicitly attached) being tracked.
It's state however is incorrectly tracked as "Added" and not "Unchanged".
If the new entity were to be attached via context.Attach, its state is correctly determined.
Steps to reproduce
Repro : https://github.com/avinash-phaniraj-readify/EFCoreTestBed/tree/DetectChangesStateError
Further technical details
EF Core version: 2.1.4
Database Provider: EntityFrameworkCore.SqlServerCompact35 2.1.2.1
Operating system: Win 10
IDE: (e.g. Visual Studio 2017 15.8.4)
The text was updated successfully, but these errors were encountered: