Execute a query and return the results in an interator, binding the values to "?"s parameters 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, _
	values As Object(), _
	types As IType() _
) As IEnumerable
C#
[ObsoleteAttribute("Use ISession.CreateQuery().SetXYZ().Enumerable()")]
IEnumerable Enumerable(
	string query,
	Object[] values,
	IType[] types
)
Visual C++
[ObsoleteAttribute(L"Use ISession.CreateQuery().SetXYZ().Enumerable()")]
IEnumerable^ Enumerable(
	String^ query, 
	array<Object^>^ values, 
	array<IType^>^ types
)
JavaScript
function enumerable(query, values, types);

Parameters

query
Type: System..::.String
The query string
values
Type: array< System..::.Object >[]()[]
A list of values to be written to "?" placeholders in the query
types
Type: array< NHibernate.Type..::.IType >[]()[]
A list of hibernate types of the values

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