Replies: 1 comment
-
You can do that with a custom action. For example, on your startup code: Audit.Core.Configuration.AddCustomAction(ActionType.OnScopeCreated, scope =>
{
var efEvent = scope.GetEntityFrameworkEvent();
if (efEvent != null && efEvent.Entries.All(e => e.Changes.Count == 0))
{
scope.Discard();
}
}); |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have a table with some columns set [AuditIgnore] attribute. But when a row is updated and only ignored columns are modified with new value, audit is saved with "no columns changes".
In that case I would like to not audit at all when only ignored columns are updated.
Something like cancel AuditEntityAction when entry.Action == "Update" && entry.Changes.Count == 0
Beta Was this translation helpful? Give feedback.
All reactions