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
handlerFunc<IAsyncEnumerable<T>, CancellationToken, ValueTask>Receives the rows, which are read as it enumerates them.
cancellationTokenCancellationTokenThe token that cancels the read.
Returns
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
handlerFunc<IAsyncEnumerable<T>, CancellationToken, ValueTask<TResult>>Receives the rows, which are read as it enumerates them.
cancellationTokenCancellationTokenThe token that cancels the read.
Returns
- ValueTask<TResult>
The value the handler returns.
Type Parameters
TResultThe type the handler returns.