Convenience method to return a single instance that matches
the query, or null if the query returns no results.
Namespace:
NHibernateAssembly: NHibernate (in NHibernate.dll)
Syntax
Visual Basic (Declaration) |
---|
Function UniqueResult As Object |
C# |
---|
Object UniqueResult() |
Visual C++ |
---|
Object^ UniqueResult() |
JavaScript |
---|
function uniqueResult(); |
Return Value
the single result or nullNothingnullptra null reference (Nothing in Visual Basic)
Exceptions
Exception | Condition |
---|---|
NHibernate..::.HibernateException | If there is more than one matching result |