Return the persistent instance of the given entity class with the given identifier, or null if there is no such persistent instance. Obtain the specified lock mode if the instance exists.

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

Syntax

Visual Basic (Declaration)
Function Get ( _
	clazz As Type, _
	id As Object, _
	lockMode As LockMode _
) As Object
C#
Object Get(
	Type clazz,
	Object id,
	LockMode lockMode
)
Visual C++
Object^ Get(
	Type^ clazz, 
	Object^ id, 
	LockMode^ lockMode
)
JavaScript
function get(clazz, id, lockMode);

Parameters

clazz
Type: System..::.Type
a persistent class
id
Type: System..::.Object
an identifier
lockMode
Type: NHibernate..::.LockMode
the lock mode

Return Value

a persistent instance or null

See Also