Skip to main content
All docs
V24.1
.NET 6.0+

AuditTrailEvents.OnCustomizeAuditDataStore Property

Specifies a delegate method that applies customization logic to the audit data store.

Namespace: DevExpress.ExpressApp.AuditTrail

Assembly: DevExpress.Persistent.BaseImpl.Xpo.v24.1.dll

Declaration

public Action<CustomizeAuditDataStoreContext> OnCustomizeAuditDataStore { get; set; }

Property Value

Type Description
Action<DevExpress.ExpressApp.AuditTrail.CustomizeAuditDataStoreContext>

A delegate method that takes the event context object as an argument.

Remarks

Use this property to customize the audit data store’s settings. For example, the code below demonstrates how to specify a custom null value string for the audit data store:

File: MySolution.WebApi\startup.cs (MySolution.Blazor.Server\startup.cs)

builder.Modules
    .AddAuditTrailXpo(options => {
        options.Events.OnCustomizeAuditDataStore = (context) => {
            context.AuditDataStore.NullValueString = "CustomNullValueString";
        };
    })

You can also register the audit trail services directly as the code below demonstrates:

File: MySolution.WebApi\startup.cs (MySolution.Blazor.Server\startup.cs)

services
    .AddAuditTrailXpoServices(options => {
        options.Events.OnCustomizeAuditDataStore = (context) => {
            context.AuditDataStore.NullValueString = "CustomNullValueString";
        };
    })
See Also