Return the persistent instance of the given entity class with the given identifier, obtaining the specified lock mode.

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

Syntax

C#
T Load<T>(
	Object id,
	LockMode lockMode
)
Visual Basic
Function Load(Of T) ( _
	id As Object, _
	lockMode As LockMode _
) As T
Visual C++
generic<typename T>
T Load(
	Object^ id, 
	LockMode^ lockMode
)

Parameters

id
Type: System..::..Object
A valid identifier of an existing persistent instance of the class
lockMode
Type: NHibernate..::..LockMode
The lock level

Type Parameters

T
A persistent class

Return Value

the persistent instance

See Also