Skip to content
Discussion options

You must be logged in to vote

Note that the EventEntry class (the second parameter in AuditEntityAction) represents a single entry from the internal EF change tracker, with each entry corresponding to one and only one entity. As a result, the AuditEntityAction is executed once for each changed mapped entry.

Since you are mapping only the User table using .Map<User, AuditHeader>(), only changes to User entities will be captured.

However, the AuditEvent (the first parameter in AuditEntityAction) contains all the changes from the EF change tracker for a single SaveChanges call. This means it is theoretically possible to detect changes in the Roles collection for a User within your AuditEntityAction.

To ensure that change…

Replies: 4 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by Jimm119
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants