EntityFrameworkCore.Triggered
EntityFrameworkCore.Triggered copied to clipboard
Detect exactly which column is changed
Hello
I want to create an audit for those properties whose old and new values are different. Is there a way to detect which property is changed on the AfterSave method?
Waiting for your answer!
Best Wishes Saad
@saadsaeed01 An audited feature is implemented as part of an example of this project, please see: https://github.com/koenbeuk/EntityFrameworkCore.Triggered/blob/master/samples/3%20-%20StudentManagerAspNetCore/Triggers/Traits/Audited/CreateAuditRecord.cs
This trigger records an audit record that includes a string with all properties that have changed in that update (including old value and new value). You can use this as an example for implementing your own auditing requirements
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.