Skip to main content
A newer version of this page is available. .
.NET Framework 4.5.2+

Miscellaneous Customizations of the Audit Trail System

  • 2 minutes to read

Implement Custom Persistent Object to be Used as the Audit Data Store

By default, the AuditDataItemPersistent class is used as the audit data store. If you want to store extra audit information, inherit from this class, or implement the IAuditDataItemPersistent interface “from scratch”. In the overridden OnSaving method of your AuditDataItemPersistent descendant, you can initialize extra properties based on the AuditedObject, PropertyName and other info from the base class. To use your custom class instead of the default one, set the AuditDataItemPersistentType property of the Audit Trail module in the Application Designer (not in the Module Designer).

Specify the String Representation of the Null Value

By default, the null value is saved as the “N/A” string. If you desire, you can change its string representation. For this purpose, use AuditTrailService.Instance.AuditDataStore‘s NullValueString property.

Specify the String Representation of Reference Type Properties

Implement a descendant of the AuditDataStore class and override the GetDefaultStringRepresentation method. In addition, set the AuditTrailService.Instance.AuditDataStore property to an instance of your class.

Customize the Blob Properties Storage Mechanism

By default, Blob property values are not saved. The “Blob data” string is saved instead. You can customize this behavior by implementing the AuditDataStore class and overriding the Save method. In this instance, set the AuditTrailService.Instance.AuditDataStore property to an instance of your class.

See Also