DbCommandDispatcher.ScalarAsync 方法

定义

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>

参数

command
DbCommand

将对其执行操作的命令。

interceptionContext
DbCommandInterceptionContext

有关所执行调用上下文的可选信息。

cancellationToken
CancellationToken

异步操作的取消标记。

返回

操作的结果,可能已被侦听器修改。

注解

请注意,执行命令的结果由此方法返回。 结果在传递到此方法的拦截上下文中不可用,因为拦截上下文是在传递到侦听器之前克隆的。

适用于