Execute a query and return the results in an interator, binding a value to a "?" parameter in the query string.

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

Syntax

Visual Basic (Declaration)
<ObsoleteAttribute("Use ISession.CreateQuery().SetXYZ().Enumerable()")> _
Function Enumerable ( _
	query As String, _
	value As Object, _
	type As IType _
) As IEnumerable
C#
[ObsoleteAttribute("Use ISession.CreateQuery().SetXYZ().Enumerable()")]
IEnumerable Enumerable(
	string query,
	Object value,
	IType type
)
Visual C++
[ObsoleteAttribute(L"Use ISession.CreateQuery().SetXYZ().Enumerable()")]
IEnumerable^ Enumerable(
	String^ query, 
	Object^ value, 
	IType^ type
)
JavaScript
function enumerable(query, value, type);

Parameters

query
Type: System..::.String
The query string
value
Type: System..::.Object
A value to be written to a "?" placeholder in the query string
type
Type: NHibernate.Type..::.IType
The hibernate type of the value

Return Value

An enumerator

Remarks

If the query has multiple return values, values will be returned in an array of type object[].

Entities returned as results are initialized on demand. The first SQL query returns identifiers only. So Enumerator() is usually a less efficient way to retrieve object than Find().

See Also