Audit for EF Core

audit entity-framework-core

Question

I would like to implement audit functionality using EF Core.

I mean would like to log every transaction/action such as Create, update and delete in DB table.

I have searched on google and found some library and solution.

https://www.nuget.org/packages/Audit.EntityFramework.Core/

https://beeming.net/data/2017/1/easily-adding-auditing-to-a-entity-framework-code-first-project

Can some one suggest me best practices for auditing for EF Core Note: I am using EF Core 2.X

1
1
1/23/2019 6:35:42 AM

Popular Answer

The basic process for auditing is to override the SaveChanges() method on the DbContext and plug in some logic. The DbContext has a ChangeTracker property that makes it super easy to access the before and after values

1
5/29/2019 11:38:39 AM


Related Questions





Related

Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow