Table of Contents

ExecuteCommandAsync Method

Definition

Namespace
Cuemon.Data
Assemblies
Cuemon.Data.dll
Source
src/Cuemon.Data/DataManager.cs

ExecuteCommandAsync<T>(DataStatement, Func<DbCommand, Task<T>>)

Asynchronous core method for executing methods on the DbCommand resolved from the abstract GetDbCommand(DataStatement) method.

protected virtual Task<T> ExecuteCommandAsync<T>(DataStatement statement, Func<DbCommand, Task<T>> executeSelector)

Parameters

statement DataStatement

The command statement to execute.

executeSelector Func<DbCommand, Task<T>>

The function delegate that will invoke a method on the resolved DbCommand from the abstract GetDbCommand(DataStatement) method.

Returns

Task<T>

A task that represents the asynchronous operation. The task result contains a value of T that is equal to the invoked method of DbCommand.

Type Parameters

T

The type to return.