Spring.NET 1.3.0 RC1 for .NET 2.0 API Reference

IHibernateOperations.FindByNamedQueryAndNamedParam(T)(String, String, Object, IType) Method

Execute a named query for persistent instances, binding number of values to named parameters in the query string. A named query is defined in a Hibernate mapping file.

[Visual Basic]
Public Sub FindByNamedQueryAndNamedParam(Of T)( _
   ByVal queryName As String, _
   ByVal paramNames As String, _
   ByVal values As Object, _
   ByVal types As IType _
IList<T> FindByNamedQueryAndNamedParam<T>(
   string queryName,
   string[] paramNames,
   object[] values,
   IType[] types


The name of a Hibernate query in a mapping file
The names of the parameters
The values of the parameters.
Hibernate types of the parameters (or null)

Return Value

A generic List containing 0 or more persistent instances


Exception Type Condition
DataAccessException In case of Hibernate errors
ArgumentOutOfRangeException If paramNames length is not equal to values length or if paramNames length is not equal to types length (when types is not null)

See Also

IHibernateOperations Interface | Spring.Data.NHibernate.Generic Namespace | IHibernateOperations.FindByNamedQueryAndNamedParam(T) Overload List