Acquire an appropriate type of lock on the underlying data that will endure until the end of the current transaction.

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

Syntax

C#
void Lock(
	Object id,
	Object version,
	Object obj,
	ISessionImplementor session
)
Visual Basic
Sub Lock ( _
	id As Object, _
	version As Object, _
	obj As Object, _
	session As ISessionImplementor _
)
Visual C++
void Lock(
	Object^ id, 
	Object^ version, 
	Object^ obj, 
	ISessionImplementor^ session
)

Parameters

id
Type: System..::..Object
The id of the row to be locked
version
Type: System..::..Object
The current version (or null if not versioned)
obj
Type: System..::..Object
The object logically being locked (currently not used)
session
Type: NHibernate.Engine..::..ISessionImplementor
The session from which the lock request originated

See Also