-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Get PrimaryKey value in SavingChangesAsync interceptor #33686
Comments
@prrami Store generated key values are not available until the database has generated these values. This means they will never be available in |
I have implemented below code in SavingChangesAsync interceptor. I want to implement AuditLogs for each entry/modification in table. How to get primaryKeyValue in case of entry.state == Added. How can I get newly generated Id. Right now I am getting some random value (-9223372036854774807) in case of entry.state==Added.
I have tried to do it with SavedChangesASync also but there I get entry.state as Unchanged always even if entry is Added or Modified.
The text was updated successfully, but these errors were encountered: