Skip to content

DmGroupQuery`3 ​

Namespace: MJCZone.DapperMatic.Dml

Assembly: MJCZone.DapperMatic

Summary ​

Groups read as something made of their keys and aggregates.

sealed public

Contents ​

Methods (8)

Methods ​

MethodSummary
ToListAsyncReads the groups.
FirstAsyncReads the first group, in the query's order.
SingleAsyncReads the one group the query returns.
ToSqlWrites the SQL that CancellationToken) runs, without running it....
GetType
ToString
Equals
GetHashCode

ToListAsync ​

Reads the groups.

csharp
Task<List<TResult>> ToListAsync(
    IDbTransaction tx,
    CancellationToken cancellationToken)

Parameters ​

  • tx (IDbTransaction) - The transaction to use, or null.
  • cancellationToken (CancellationToken) - The cancellation token.

Returns ​

Type: Task<List<TResult>>

The results.

FirstAsync ​

Reads the first group, in the query's order.

csharp
Task<TResult?> FirstAsync(
    IDbTransaction tx,
    CancellationToken cancellationToken)

Parameters ​

  • tx (IDbTransaction) - The transaction to use, or null.
  • cancellationToken (CancellationToken) - The cancellation token.

Returns ​

Type: Task<TResult?>

The result, or the default if there are no groups.

SingleAsync ​

Reads the one group the query returns.

csharp
Task<TResult?> SingleAsync(
    IDbTransaction tx,
    CancellationToken cancellationToken)

Parameters ​

  • tx (IDbTransaction) - The transaction to use, or null.
  • cancellationToken (CancellationToken) - The cancellation token.

Returns ​

Type: Task<TResult?>

The result, or the default if there are no groups.

ToSql ​

Writes the SQL that CancellationToken) runs, without running it.

csharp
DmStatement ToSql()

Returns ​

Type: DmStatement

The SQL and its parameters.

GetType ​

csharp
GetType()

ToString ​

csharp
ToString()

Equals ​

csharp
Equals()

GetHashCode ​

csharp
GetHashCode()