Table of Contents

Method ExecuteReaderAsync

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

ExecuteReaderAsync(Func<TReader, ValueTask>, CommandBehavior)

Asynchronously executes the command and passes the data reader to handler.

ValueTask ExecuteReaderAsync(Func<out TReader, ValueTask> handler, CommandBehavior behavior = CommandBehavior.Default)

Parameters

handler Func<TReader, ValueTask>

The function that processes the data reader.

behavior CommandBehavior

The CommandBehavior to run the reader with. The default is Default.

Returns

ValueTask

A task that represents the asynchronous operation.

ExecuteReaderAsync<T>(Func<TReader, ValueTask<T>>, CommandBehavior)

Asynchronously executes the command, passes the data reader to transform and returns its result.

ValueTask<T> ExecuteReaderAsync<T>(Func<out TReader, ValueTask<T>> handler, CommandBehavior behavior = CommandBehavior.Default)

Parameters

handler Func<TReader, ValueTask<T>>

The function that processes the data reader and produces the result.

behavior CommandBehavior

The CommandBehavior to run the reader with. The default is Default.

Returns

ValueTask<T>

A task that produces the result of transform.

Type Parameters

T

The type the transform returns.