Class SqlQueryResultRefExtensions
- Namespace
- LfrlAnvil.Sql.Statements
- Assembly
- LfrlAnvil.Sql.Core.dll
Contains SqlQueryResult<TRow> extension methods for rows of ref type.
public static class SqlQueryResultRefExtensions
- Inheritance
-
SqlQueryResultRefExtensions
- Inherited Members
Methods
SingleOrDefault<TRow>(SqlQueryResult<TRow>)
Returns the only row from source query result.
[Pure]
public static TRow? SingleOrDefault<TRow>(this SqlQueryResult<TRow> source) where TRow : class
Parameters
sourceSqlQueryResult<TRow>Query result.
Returns
- TRow
The only row or null if there are no rows.
Type Parameters
TRowRow type.
Exceptions
- InvalidOperationException
When query result contains more than one row.