Skip to main content
All docs
V25.1
  • .NET 8.0+
    • The page you are viewing does not exist in the .NET Framework 4.6.2+ platform documentation. This link will take you to the parent topic of the current section.

    OptimisticLockIgnoreAttribute Class

    Applies to EF Core business class. Disables optimistic concurrency control.

    Namespace: DevExpress.ExpressApp.DC

    Assembly: DevExpress.ExpressApp.v25.1.dll

    NuGet Package: DevExpress.ExpressApp

    Declaration

    [AttributeUsage(AttributeTargets.Class | AttributeTargets.Property, Inherited = true)]
    public class OptimisticLockIgnoreAttribute :
        Attribute

    Remarks

    Use OptimisticLockgnoreAttribute to disable concurrency control in a business class or a property of an EF Core-based XAF application.

    The following code snippet uses OptimisticLockIgnoreAttribute on a class level:

    using Microsoft.EntityFrameworkCore;
    
    namespace MainDemo.Module.BusinessObjects;
    
    [OptimisticLockIgnore]
    public class Department : BaseObject {
        //...
    }
    

    The following code snippet uses OptimisticLockIgnoreAttribute on a property level:

    using Microsoft.EntityFrameworkCore;
    
    namespace MainDemo.Module.BusinessObjects;
    
    public class Department : BaseObject {
        //...
        [OptimisticLockIgnore]
        public virtual string Office { get; set; }
    }
    

    For more information about optimistic concurrency control in EF Core-based XAF applications, refer to the following topic: Optimistic Locking (Concurrency Control in EF Core).

    Inheritance

    Object
    Attribute
    OptimisticLockIgnoreAttribute
    See Also