Obtain the specified lock level upon the given object.

Namespace: NHibernate
Assembly: NHibernate (in NHibernate.dll) Version: 3.2.0.4000 (3.2.0.4000)

Syntax

C#
void Lock(
	Object obj,
	LockMode lockMode
)
Visual Basic
Sub Lock ( _
	obj As Object, _
	lockMode As LockMode _
)
Visual C++
void Lock(
	Object^ obj, 
	LockMode^ lockMode
)

Parameters

obj
Type: System..::..Object
A persistent instance
lockMode
Type: NHibernate..::..LockMode
The lock level

See Also