Table of Contents

Method ExecuteAsync

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

ExecuteAsync(Func<TCommand, ValueTask>)

Asynchronously creates a command of type TCommand and passes it to handler.

ValueTask ExecuteAsync(Func<out TCommand, ValueTask> handler)

Parameters

handler Func<TCommand, ValueTask>

The asynchronous function that operates on the command.

Returns

ValueTask

A task that completes after handler has completed and the connection has been released.

Remarks

Implementations that expose a cancellation token throw OperationCanceledException if it is already canceled when this method is called.

ExecuteAsync<T>(Func<TCommand, ValueTask<T>>)

Asynchronously creates a command of type TCommand and passes it to transform, returning its result.

ValueTask<T> ExecuteAsync<T>(Func<out TCommand, ValueTask<T>> transform)

Parameters

transform Func<TCommand, ValueTask<T>>

The asynchronous function that operates on the command.

Returns

ValueTask<T>

A task that produces the value returned by transform after the connection has been released.

Type Parameters

T

The return type of the transform function.

Remarks

Implementations that expose a cancellation token throw OperationCanceledException if it is already canceled when this method is called.