Reputation: 1877
I'm requiring a way to audit an MVC3 EF application capturing the following values:
I think I've wrongfully done the binding manually, and as a result all the row is updated after an edit (so trigger will assume everything is being updated)... therefore rather avoid DB triggers as it'll need a re-write of all the binding.
I would imagine, if I can capture the old values (somehow), and then compare to the new values, I can populate an audit table with the above fields.
Any advice on this would be much appreciated.
Upvotes: 1
Views: 585
Reputation: 1906
You can subscribe to the saving changes event of the entity. Here is an example... Change History in MVC and EF
Upvotes: 0
Reputation: 3434
Depending on the version of SQL you using you could look in to Change Data Capture
Upvotes: 1