Skip to main content
.NET 6.0+

Session.LockingOption Property

Gets or sets a value which controls the persistent object’s locking during a session.

Namespace: DevExpress.Xpo

Assembly: DevExpress.Xpo.v24.1.dll

NuGet Package: DevExpress.Xpo

Declaration

[DefaultValue(LockingOption.Optimistic)]
public LockingOption LockingOption { get; set; }

Property Value

Type Default Description
LockingOption Optimistic

A LockingOption enumeration value which controls the persistent object’s locking during a session.

Remarks

To ensure proper execution in multi-session applications, a persistent object’s state along with its recent data is protected using LockingOption.Optimistic locking. An object is unavailable to other sessions while its data is being updated. Attempting to update an object that has already been changed results in a concurrency violation. With a “last in wins” rule (see LockingOption.None option), no check of the original data is made and the persistent object is simply overwritten by update.

See Also