Skip to main content
All docs
V24.2
.NET 8.0+

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

UseInAuditTrailAttribute Class

Specifies whether a property takes part in audit. Non-persistent properties also depend on the following property: DevExpress.Persistent.AuditTrail.ObjectAuditProcessor.ExcludeNonPersistentFromAudit.

Namespace: DevExpress.Persistent.Base

Assembly: DevExpress.ExpressApp.v24.2.dll

NuGet Package: DevExpress.ExpressApp

#Declaration

[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field, AllowMultiple = false)]
public class UseInAuditTrailAttribute :
    Attribute

#Remarks

Entity Framework Core

If you want the Audit Trail Module to stop logging property changes, apply this attribute with its Include parameter set to false.

C#
[UseInAuditTrail(false)]
public virtual string MyProperty { get; set; }
XPO

If you want the Audit Trail Module to stop logging changes in a property, apply this attribute with its Include parameter set to false.

C#
[UseInAuditTrail(false)]
public string MyProperty {
    get {
        return myproperty;
    }
    set {
        SetPropertyValue(nameof(MyProperty), ref myproperty, value);
    }
}

If you want the Audit Trail Module to log changes in a non-persistent property when DevExpress.Persistent.AuditTrail.ObjectAuditProcessor.ExcludeNonPersistentFromAudit is set to true, apply this attribute with its Include parameter set to true.

#Inheritance

Object
Attribute
UseInAuditTrailAttribute
See Also