When implemented by a class, retrieves an instance of the mapped class, or the identifier of an entity or collection from a IDataReader.

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

Syntax

C#
Object Hydrate(
	IDataReader rs,
	string[] names,
	ISessionImplementor session,
	Object owner
)
Visual Basic
Function Hydrate ( _
	rs As IDataReader, _
	names As String(), _
	session As ISessionImplementor, _
	owner As Object _
) As Object
Visual C++
Object^ Hydrate(
	IDataReader^ rs, 
	array<String^>^ names, 
	ISessionImplementor^ session, 
	Object^ owner
)

Parameters

rs
Type: System.Data..::..IDataReader
The IDataReader that contains the values.
names
Type: array<System..::..String>[]()[][]
The names of the columns in the IDataReader that contain the value to populate the IType with.
session
Type: NHibernate.Engine..::..ISessionImplementor
the session
owner
Type: System..::..Object
The parent Entity

Return Value

An identifier or actual object mapped by this IType.

Remarks

This is useful for 2-phase property initialization - the second phase is a call to ResolveIdentifier()

Most implementors of this method will just pass the call to NullSafeGet().

See Also