Obtain an instance of IQuery for a named query string defined in the mapping file.

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

Syntax

C#
IQuery GetNamedQuery(
	string queryName
)
Visual Basic
Function GetNamedQuery ( _
	queryName As String _
) As IQuery
Visual C++
IQuery^ GetNamedQuery(
	String^ queryName
)

Parameters

queryName
Type: System..::..String
The name of a query defined externally.

Return Value

An IQuery from a named query string.

Remarks

The query can be either in HQL or SQL format.

See Also