Skip to main content
All docs
V25.1
  • .NET 8.0+

    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.v25.1.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.

    [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.

    [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