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
handlerFunc<TReader, ValueTask>The function that processes the data reader.
behaviorCommandBehaviorThe 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
handlerFunc<TReader, ValueTask<T>>The function that processes the data reader and produces the result.
behaviorCommandBehaviorThe CommandBehavior to run the reader with. The default is Default.
Returns
- ValueTask<T>
A task that produces the result of
transform.
Type Parameters
TThe type the transform returns.