Bewerken

Delen via


InstancePersistenceContext.InstanceVersion Property

Definition

Gets the version of the lock held on the current instance by the current instance handle.

public:
 property long InstanceVersion { long get(); };
public long InstanceVersion { get; }
member this.InstanceVersion : int64
Public ReadOnly Property InstanceVersion As Long

Property Value

The version of the instance lock bound to the current instance handle, or -1 if the handle isn't bound to a lock.

Remarks

The persistence provider should check this value against the lock version of the lock held on an instance in the instance store when performing an operation that requires a lock (such as persisting instance data) using a handle bound to the lock. If the lock version doesn't match, the command should fail with InstanceLockLostException.

Applies to