The requested page is not available for the requested platform. You are viewing the content for .NET Framework 4.5.2+ platform.
.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+

Session.OptimisticLockingReadBehavior Property

Gets or sets a value which specifies how XPO behaves when reloading changed objects (objects with different versions).

Namespace: DevExpress.Xpo

Assembly: DevExpress.Xpo.v19.1.dll

Declaration

[DefaultValue(OptimisticLockingReadBehavior.Default)]
public OptimisticLockingReadBehavior OptimisticLockingReadBehavior { get; set; }
<DefaultValue(OptimisticLockingReadBehavior.Default)>
Public Property OptimisticLockingReadBehavior As OptimisticLockingReadBehavior
[DefaultValue(OptimisticLockingReadBehavior.Default)]
public OptimisticLockingReadBehavior OptimisticLockingReadBehavior { get; set; }
<DefaultValue(OptimisticLockingReadBehavior.Default)>
Public Property OptimisticLockingReadBehavior As OptimisticLockingReadBehavior

Property Value

Type Default Description
OptimisticLockingReadBehavior

Default

An OptimisticLockingReadBehavior enumeration value that specifies how XPO behaves when reloading changed objects (objects with different versions).

Property Value

Type Default Description
OptimisticLockingReadBehavior

Default

An OptimisticLockingReadBehavior enumeration value that specifies how XPO behaves when reloading changed objects (objects with different versions).

Remarks

XPO v1 automatically reloads changed objects. To determine the change, it reads the database's OptimisticLock field value which is loaded with each query.

XPO v2 allows automatic object reloading to be disabled. It exposes two properties that control XPO's behavior in such instances. These properties are: OptimisticLockingReadBehavior and XpoDefault.OptimisticLockingReadBehavior. The default values of these properties provides the same behavior as in XPO v1. Note that the default behavior can be changed later on. Thus, if your code depends upon this behavior, make sure to explicitly specify the desired behavior using the properties mentioned above.

See Also