Skip to content

DmJoinQuery`3 ​

Namespace: MJCZone.DapperMatic.Dml

Assembly: MJCZone.DapperMatic

Summary ​

Rows of 3 models joined by conditions written out: one <c>SELECT</c>, built up by <c>Where</c>, <c>OrderBy</c>, <c>Skip</c>, <c>Take</c> and <c>Distinct</c> over all the joined rows, read as tuples or by <c>Select</c>.

sealed public

Contents ​

Methods (21)

Methods ​

MethodSummary
Join
LeftJoin
Where
OrderBy
OrderByDescending
ThenBy
ThenByDescending
SkipSkips rows.
TakeReturns at most a number of rows.
DistinctReturns each distinct combination of rows once.
Select
GroupBy
ToListAsyncReads the joined rows.
FirstAsyncReads the first joined rows: in the query's order, or the first model's key order if it has none.
CountAsyncCounts the joined rows.
ExistsAsyncTells whether there are any joined rows.
ToSqlWrites the SQL that CancellationToken) runs, without running it....
GetType
ToString
Equals
GetHashCode

Join ​

csharp
Join()

LeftJoin ​

csharp
LeftJoin()

Where ​

csharp
Where()

OrderBy ​

csharp
OrderBy()

OrderByDescending ​

csharp
OrderByDescending()

ThenBy ​

csharp
ThenBy()

ThenByDescending ​

csharp
ThenByDescending()

Skip ​

Skips rows.

csharp
DmJoinQuery&lt;T1, T2, T3&gt; Skip(int count)

Parameters ​

  • count (int) - The number of rows to skip.

Returns ​

Type: DmJoinQuery&lt;T1, T2, T3&gt;

The query.

Take ​

Returns at most a number of rows.

csharp
DmJoinQuery&lt;T1, T2, T3&gt; Take(int count)

Parameters ​

  • count (int) - The most rows to return.

Returns ​

Type: DmJoinQuery&lt;T1, T2, T3&gt;

The query.

Distinct ​

Returns each distinct combination of rows once.

csharp
DmJoinQuery&lt;T1, T2, T3&gt; Distinct()

Returns ​

Type: DmJoinQuery&lt;T1, T2, T3&gt;

The query.

Select ​

csharp
Select()

GroupBy ​

csharp
GroupBy()

ToListAsync ​

Reads the joined rows.

csharp
Task&lt;List&lt;(T1, T2?, T3?)&gt;&gt; ToListAsync(
    IDbTransaction tx,
    CancellationToken cancellationToken)

Parameters ​

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

Returns ​

Type: Task&lt;List&lt;(T1, T2?, T3?)&gt;&gt;

The rows, a tuple per combination.

FirstAsync ​

Reads the first joined rows: in the query's order, or the first model's key order if it has none.

csharp
Task&lt;Nullable&lt;(T1, T2, T3)&gt;&gt; FirstAsync(
    IDbTransaction tx,
    CancellationToken cancellationToken)

Parameters ​

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

Returns ​

Type: Task&lt;Nullable&lt;(T1, T2, T3)&gt;&gt;

The rows, or null if there are none.

CountAsync ​

Counts the joined rows.

csharp
Task&lt;long&gt; CountAsync(IDbTransaction tx, CancellationToken cancellationToken)

Parameters ​

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

Returns ​

Type: Task&lt;long&gt;

The number of rows.

ExistsAsync ​

Tells whether there are any joined rows.

csharp
Task&lt;bool&gt; ExistsAsync(IDbTransaction tx, CancellationToken cancellationToken)

Parameters ​

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

Returns ​

Type: Task&lt;bool&gt;

True if there are.

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()