ILockingSemantics implementation providing support for optimistic locking.
For a list of all members of this type, see OptimisticLockingSemantics Members.
System.Object
OptimisticLockingSemantics
Aquiring a lock with Context.Lock or Context.TryLock using OptimisticLockingSemantics always succeeds. Any number of Contexts can aquire an optimistic lock on the same object at the same time.
Optimistic locks held by a Context are checked when the Context is commited, and if the object version stored on the server does not equal to the version of the object in the Context an LockViolationException is thrown. This ensures that changes made by an other Context will not be overwritten accidentaly.
To access the singleton OptimisticLockingSemantics instance when configuring locking for a Context through LockingSemanticsBindings or calling Context.Lock or Context.TryLock use the Value static property.
Namespace: TechTalk.Genome.Locking
Assembly: TechTalk.Genome (in TechTalk.Genome.dll)
Version: 4.2.4.4
Editions: Professional, Evaluation, Express
Database Platforms: Microsoft SQL Server 2000, Microsoft SQL Server 2005, Orcale 9i Release 2, Oracle 10g Release 2
OptimisticLockingSemantics Members | TechTalk.Genome.Locking Namespace