语言

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)

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

NonQueryAsync(DbCommand, DbCommandInterceptionContext, CancellationToken)

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

Reader(DbCommand, DbCommandInterceptionContext)

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

ReaderAsync(DbCommand, DbCommandInterceptionContext, CancellationToken)

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

Scalar(DbCommand, DbCommandInterceptionContext)

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

ScalarAsync(DbCommand, DbCommandInterceptionContext, CancellationToken)

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

ToString()

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

适用于