Base solution for your next web application
Ends in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

Audit Change Log #6362


User avatar
0
amitjpat created

Dear All,

I would like to add some custom information with each audit change for the objects. Mainly I need Tenant Name and id for the entities we are chaning as it only records property which is changed but with all change I would like to add tenant name. How can we achive the same.

Thank you, Amit


1 Answer(s)
  • User Avatar
    0
    aaron created
    Support Team
    1. Create a class derived from WebAuditInfoProvider (say YourAuditInfoProvider)
    2. Override Fill method. After calling the base.Fill, you can set auditInfo.CustomData.
    3. Replace your own provider as described here: http://www.aspnetboilerplate.com/Pages/Documents/Startup-Configuration#replacing-built-in-services
    Configuration.ReplaceService<IAuditInfoProvider, YourAuditInfoProvider>(DependencyLifeStyle.Transient);
    

    https://github.com/aspnetboilerplate/aspnetboilerplate/issues/1123