-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide event that can be used to get notifications when all property changes have been detected #26506
Comments
In ChangeTracker.StateChanged, why is Also, how to rewrite the answer after this breaking change? INavigationBase.ForeignKey is missing |
Note for triage: The state changed event happens as soon as an entity is detected as modified, which in this case happens when the Name property is detected as changed. At this time the FK property has not yet been detected as changed. We should consider delaying this event until all properties of the entity have gone through change detection. @samuelpsfung To answer your second question, cast the |
… when all changes for an entity have been detected Fixes #26506 Also disable auto-DetectChanges when in the event to prevent infinite loop of recursive calls.
On further investigation, delaying the event is not appropriate since the state must change when the first property change is detected. However, the new |
Please see attached program. I use a shadow property for one-to-many relationship, and wish to capture changes in ChangeTracker.StateChanged event. When the parent relationship changed, the current value in the event is still the same as the original one.
EFEvents.zip
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
The text was updated successfully, but these errors were encountered: