Audit.EntityFramework: Old and new value are always the same
See original GitHub issueHi!
I´m using Audit.EntityFramework and on log output the old and new values for changed entity are always the same!
My config on statup.cs:
Audit.Core.Configuration.Setup().UseSqlServer(c => {
c.ConnectionString(Configuration.GetConnectionString("audit.db"));
c.Schema("dbo");
c.TableName("Event");
c.IdColumnName("EventId");
c.JsonColumnName("Data");
c.LastUpdatedColumnName("LastUpdatedDate");
});
Audit.EntityFramework.Configuration.Setup()
.ForAnyContext(x => x.IncludeEntityObjects(true)
.AuditEventType("{context}:{database}"))
.UseOptOut();
Thankyou for the library and support!
Issue Analytics
- State:
- Created 6 years ago
- Comments:21 (10 by maintainers)
Top Results From Across the Web
EF2.2 Core 2.2 Auditing returns same old and new value ...
I am trying to implement an Audit table in my .net core (2.2) using EF 2.2 code first. My intention is to log...
Read more >Audit Trail Implementation in ASP.NET Core with Entity ...
We will track the following with our implementation. TableName; Affected Column(s); Primary Key / Value of the Table; Old Values; New Values ......
Read more >Entity Change Tracking using DbContext in ...
It allows you to record the entity changed, the value changed, the primary key of the changed record, and the date of change....
Read more >3 Ways to Implement Auditable Entities in Entity Framework ...
In this article, we'll look at 3 different options that developers can use to implement auditing functionality for domain entities ( CreatedAt , ......
Read more >Easily adding auditing to a Entity Framework Code First project
This post will show you how to easily do auditing with entity framework projects. ... and then add a new MVC 5 Controller...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I don’t think this is related to this library, you could reuse that code just by adding a method on your DbContext like:
The configuration in applicable by DbContext, not by controller. You can do enable it globally (for any context) with the following code in your startup: