Execute a query and return the results in an interator.
Namespace:
NHibernateAssembly: NHibernate (in NHibernate.dll)
Syntax
Visual Basic (Declaration) |
---|
<ObsoleteAttribute("Use ISession.CreateQuery().Enumerable()")> _ Function Enumerable ( _ query As String _ ) As IEnumerable |
C# |
---|
[ObsoleteAttribute("Use ISession.CreateQuery().Enumerable()")] IEnumerable Enumerable( string query ) |
Visual C++ |
---|
[ObsoleteAttribute(L"Use ISession.CreateQuery().Enumerable()")] IEnumerable^ Enumerable( String^ query ) |
JavaScript |
---|
function enumerable(query); |
Parameters
- query
- Type: System..::.String
The query string
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().