Skip to main content
All docs
V24.2
.NET Framework 4.6.2+

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

AuditTrailEvents.OnCustomCreateAuditDataStore Property

Specifies a delegate method that creates a custom data store for audit trails.

Namespace: DevExpress.ExpressApp.AuditTrail

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

#Declaration

public Action<CustomCreateAuditDataStoreContext> OnCustomCreateAuditDataStore { get; set; }

#Property Value

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

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

#Remarks

Use this property to specify a custom audit data store (an AuditDataStore descendant):

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

builder.Modules
    .AddAuditTrailXpo(options => {
        options.Events.OnCustomCreateAuditDataStore = (context) => {
            context.AuditDataStore = new CustomAuditDataStore();
        };
    })

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.OnCustomCreateAuditDataStore = (context) => {
            context.AuditDataStore = new CustomAuditDataStore();
        };
    })
See Also