I'am using the Audit.Net to track the changes. Very good libray
By using Audit.EntityFramework extension, we can ignore the properties to be track.
public class User
{
public int Id { get; set; }
[AuditIgnore]
public string Password { get; set; }
...
}
But I have problem
- I'am not using
Audit.EntityFramework
extension. Just get the json format by using my own custom data provider. So[AuditIgnore]
cannot work here. - How to ignore the
password property
on theIdentityUser
class?
Here my custom data provider
public class MyCustomDataProvider : AuditDataProvider
{
public override object InsertEvent(AuditEvent auditEvent)
{
var AuditEventInJson = auditEvent.ToJson();
//Save into to DB;
}
}