change-tracking

Installation
SKILL.md

Change Tracking

Manages entity states and detects changes for SaveChanges().

Core Components

  • StateManager — central engine, identity maps, tracks all entities
  • InternalEntityEntry — per-entity state, property flags, snapshots
  • SnapshotFactoryFactory subclasses build snapshot factories for change detection
  • PropertyAccessorsFactory, ClrPropertyGetterFactory and ClrPropertySetterFactory compile property accessors for efficient snapshotting and change detection
    • Ordinals in indices parameter specify element at each complex collection depth

Testing

Unit tests: test/EFCore.Tests/ChangeTracking/. Functional tests: test/EFCore.Specification.Tests/GraphUpdates/.

Common Pitfalls

Installs
3
Repository
dotnet/efcore
GitHub Stars
14.7K
First Seen
Mar 30, 2026
change-tracking — dotnet/efcore