NPersistence Reference Guide Create an instance of TypedQuery for executing a
Java Persistence query language named query.
The select list of the query must contain only a single
item, which must be assignable to the type specified by
the resultClass argument.
Namespace: NPersistenceAssembly: NPersistence (in NPersistence.dll) Version: 2.0.0.0 (2.0.0.0)
Syntax
TypedQuery<T> CreateNamedQuery<T>(
string name,
Type resultClass
)
Parameters
- name
- String
the name of a query defined in metadata
- resultClass
- Type
the type of the query result
Type Parameters
Return Value
the new query instance
Exceptions
Exception | Condition |
---|
System..::..ArgumentException | if a query has not been
defined with the given name or if the query string is
found to be invalid or if the query result is found to
not be assignable to the specified type |
See Also