Table of Contents

Method ReadAsync

Namespace
Open.Database.Extensions
Assembly
Open.Database.Extensions.Core.dll

ReadAsync(Func<IAsyncEnumerable<T>, CancellationToken, ValueTask>, CancellationToken)

Passes the rows of the table to the asynchronous handler.

public ValueTask ReadAsync(Func<IAsyncEnumerable<T>, CancellationToken, ValueTask> handler, CancellationToken cancellationToken)

Parameters

handler Func<IAsyncEnumerable<T>, CancellationToken, ValueTask>

Receives the rows, which are read as it enumerates them.

cancellationToken CancellationToken

The token that cancels the read.

Returns

ValueTask

ReadAsync<TResult>(Func<IAsyncEnumerable<T>, CancellationToken, ValueTask<TResult>>, CancellationToken)

Passes the rows of the table to the asynchronous handler and returns its result.

public ValueTask<TResult> ReadAsync<TResult>(Func<IAsyncEnumerable<T>, CancellationToken, ValueTask<TResult>> handler, CancellationToken cancellationToken)

Parameters

handler Func<IAsyncEnumerable<T>, CancellationToken, ValueTask<TResult>>

Receives the rows, which are read as it enumerates them.

cancellationToken CancellationToken

The token that cancels the read.

Returns

ValueTask<TResult>

The value the handler returns.

Type Parameters

TResult

The type the handler returns.