Table of Contents

Class SqlQueryResultValueExtensions

Namespace
LfrlAnvil.Sql.Statements
Assembly
LfrlAnvil.Sql.Core.dll

Contains SqlQueryResult<TRow> extension methods for rows of value type.

public static class SqlQueryResultValueExtensions
Inheritance
SqlQueryResultValueExtensions
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 : struct

Parameters

source SqlQueryResult<TRow>

Query result.

Returns

TRow?

The only row or null if there are no rows.

Type Parameters

TRow

Row type.

Exceptions

InvalidOperationException

When query result contains more than one row.