DbCommandDispatcher 类

定义

用于将操作调度到 , DbCommand 以便在操作执行前后通知任何 IDbCommandInterceptor 已注册 DbInterception 的 。 此类的实例通过 Dispatch Fluent API 获取。

public class DbCommandDispatcher
type DbCommandDispatcher = class
Public Class DbCommandDispatcher
继承
DbCommandDispatcher

注解

执行命令时,实体框架在内部使用此类。 它公开提供,以便核心 EF 程序集外运行的代码可以选择加入命令拦截/跟踪。 这通常由代表 EF 执行命令的 EF 提供程序完成。

方法

Equals(Object)

用于将操作调度到 , DbCommand 以便在操作执行前后通知任何 IDbCommandInterceptor 已注册 DbInterception 的 。 此类的实例通过 Dispatch Fluent API 获取。

GetHashCode()

用于将操作调度到 , DbCommand 以便在操作执行前后通知任何 IDbCommandInterceptor 已注册 DbInterception 的 。 此类的实例通过 Dispatch Fluent API 获取。

GetType()

获取当前实例的 Type

NonQuery(DbCommand, DbCommandInterceptionContext)

在调用 ExecuteNonQuery()之前/之后,将 和 NonQueryExecuted(DbCommand, DbCommandInterceptionContext<Int32>) 发送到NonQueryExecuting(DbCommand, DbCommandInterceptionContext<Int32>)在 上DbInterception注册的任何 IDbCommandInterceptor

NonQueryAsync(DbCommand, DbCommandInterceptionContext, CancellationToken)

在调用 ExecuteNonQueryAsync(CancellationToken)之前/之后,将 和 NonQueryExecuted(DbCommand, DbCommandInterceptionContext<Int32>) 发送到NonQueryExecuting(DbCommand, DbCommandInterceptionContext<Int32>)在 上DbInterception注册的任何 IDbCommandInterceptor

Reader(DbCommand, DbCommandInterceptionContext)

在调用 ExecuteReader(CommandBehavior)之前/之后,将 和 ReaderExecuted(DbCommand, DbCommandInterceptionContext<DbDataReader>) 发送到ReaderExecuting(DbCommand, DbCommandInterceptionContext<DbDataReader>)在 上DbInterception注册的任何 IDbCommandInterceptor

ReaderAsync(DbCommand, DbCommandInterceptionContext, CancellationToken)

在调用 ExecuteReaderAsync(CommandBehavior, CancellationToken)之前/之后,将 和 ReaderExecuted(DbCommand, DbCommandInterceptionContext<DbDataReader>) 发送到ReaderExecuting(DbCommand, DbCommandInterceptionContext<DbDataReader>)在 上DbInterception注册的任何 IDbCommandInterceptor

Scalar(DbCommand, DbCommandInterceptionContext)

在调用 ExecuteScalar()之前/之后,将 和 ScalarExecuted(DbCommand, DbCommandInterceptionContext<Object>) 发送到ScalarExecuting(DbCommand, DbCommandInterceptionContext<Object>)在 上DbInterception注册的任何 IDbCommandInterceptor

ScalarAsync(DbCommand, DbCommandInterceptionContext, CancellationToken)

在调用 ExecuteScalarAsync(CancellationToken)之前/之后,将 和 ScalarExecuted(DbCommand, DbCommandInterceptionContext<Object>) 发送到ScalarExecuting(DbCommand, DbCommandInterceptionContext<Object>)在 上DbInterception注册的任何 IDbCommandInterceptor

ToString()

用于将操作调度到 , DbCommand 以便在操作执行前后通知任何 IDbCommandInterceptor 已注册 DbInterception 的 。 此类的实例通过 Dispatch Fluent API 获取。

适用于