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

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

Syntax

C#
Object Load(
	string entityName,
	Object id,
	LockMode lockMode
)
Visual Basic
Function Load ( _
	entityName As String, _
	id As Object, _
	lockMode As LockMode _
) As Object
Visual C++
Object^ Load(
	String^ entityName, 
	Object^ id, 
	LockMode^ lockMode
)

Parameters

entityName
Type: System..::..String
The entity-name of a persistent class
id
Type: System..::..Object
a valid identifier of an existing persistent instance of the class
lockMode
Type: NHibernate..::..LockMode
the lock level

Return Value

the persistent instance or proxy

See Also