efcore
efcore copied to clipboard
Improvements to change tracking
This is a grouping of related issues. Feel free to vote (👍) for this issue to indicate that this is an area that you think we should spend time on, but consider also voting for individual issues for things you consider especially important.
This an "epic" issue for the theme of improvements to change tracking. Specific pieces of work will be tracked by linked issues.
Done in 7.0
- [x] Create lazy-loading and change-tracking proxy types lazily #20135
- [x] Provide a hook for identity resolution #20124
- [x] Make EntityEntryGraphIterator publicly usable #26461
- [x] Add interception for DetectChanges/state changes #16256
- [x] New entity is not saved under certain conditions #26937
- [x] Delay entity state changed event until all property changes have been detected #26506
- [x] Get an EntityEntry<TEntity> for Shared Entity Types #25354
Proposed for 8.0
- [x] Support lazy and explicit loading from entities queried with NoTracking behavior #10042
- [x] Lazy-loading Proxies: allow entity types/navigations to be specified #10787
- [x] Allow default value check in value generation to be customized #701
Backlog
- [ ] Consider stronger semantics around generated keys #13575
- [ ] Support modifying the value of primary or alternate key properties #4073
- [ ] Support IEnumerable navigation properties with Add/Remove/Contains methods/delegates #752
- [ ] Support immutable entity updates #11457
- [ ] Read only entities #7586
- [ ] Data access within ChangeTracker.Tracked event throws InvalidOperationException #12615
- [ ] Allow entity instances to be tracked by two bounded contexts, but limit updates to one context #23457
- [ ] Support partial loading (i.e. not eagerly loading all scalar properties) #1387
- [ ] Push queries on lazy navigation properties to database (a.k.a extra lazy loading) #1204
- [ ] Lazy Loaded Proxies (more than just lazy loaded navigation properties) #8480
- [ ] Expose loader IQueryable on ILazyLoader #23166
- [ ] Load with proxy #997
- [ ] Expose Castle.Core ProxyGenerationOptions for customization #27073
- [ ] Don't create proxy types is there is nothing to proxy #22336
- [ ] Reload(Async) does not fire PropertyChang(ing|ed) with Castle.Core-proxies #25229
- [ ] Consider not emitting DetachedLazyLoadingWarning when entity is new rather than detached #19338
- [ ] Warn when the context starts tracking a non-proxy when proxies are being used #20118
- [ ] Add collection methods to CollectionEntry #9924
- [ ] Add CollectionEntry.GetEntries(EntityState) #20067
- [ ] Detect via ChangeTracker if a modified CollectionEntry was added or removed #24129
- [ ] Set CollectionEntry.IsModified to true when removing items from a collection #24076
- [ ] Add a way of getting navigation diffs #10013
- [ ] Support OriginalValues and GetDatabaseValues for shared entity entries #19328
- [ ] Add CurrentValues.SetValuesExcept() #23365
- [ ] Shared-Type Entities: Self-Identifying entity instance #21293
- [ ] Ability to refresh a context from the database #16491
- [ ] Simple update token (a.k.a etags) specification #18121
- [ ] End-to-end soft delete #4025
- [ ] Make it easier to mock DbSet.Add #27110
- [ ] Option to turn off automatic setting of navigation properties #11564
- [ ] Exclude specific property from change tracking #19461
- [ ] Warn if a non-key property is configured as PropertySaveBehavior.Throw #23786
- [ ] Support Polymorphic Relationships #7623
- [ ] Call to change tracker changes unchanged many to many relationship to deleted #26831
- [ ] Consider delaying the detection of modified key values to SaveChanges #19135