Share via


DbCommandDispatcher.ScalarAsync Method

Definition

public virtual System.Threading.Tasks.Task<object> ScalarAsync (System.Data.Common.DbCommand command, System.Data.Entity.Infrastructure.Interception.DbCommandInterceptionContext interceptionContext, System.Threading.CancellationToken cancellationToken);
abstract member ScalarAsync : System.Data.Common.DbCommand * System.Data.Entity.Infrastructure.Interception.DbCommandInterceptionContext * System.Threading.CancellationToken -> System.Threading.Tasks.Task<obj>
override this.ScalarAsync : System.Data.Common.DbCommand * System.Data.Entity.Infrastructure.Interception.DbCommandInterceptionContext * System.Threading.CancellationToken -> System.Threading.Tasks.Task<obj>

Parameters

command
DbCommand

The command on which the operation will be executed.

interceptionContext
DbCommandInterceptionContext

Optional information about the context of the call being made.

cancellationToken
CancellationToken

The cancellation token for the asynchronous operation.

Returns

The result of the operation, which may have been modified by interceptors.

Remarks

Note that the result of executing the command is returned by this method. The result is not available in the interception context passed into this method since the interception context is cloned before being passed to interceptors.

Applies to