DbCommandInterceptor 类
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
实现 的 IDbCommandInterceptor基类。 当接口的一个或两个方法实际上只需要任何实现时,可以使用此类。
public class DbCommandInterceptor : System.Data.Entity.Infrastructure.Interception.IDbCommandInterceptor
type DbCommandInterceptor = class
interface IDbCommandInterceptor
interface IDbInterceptor
Public Class DbCommandInterceptor
Implements IDbCommandInterceptor
- 继承
-
DbCommandInterceptor
- 实现
构造函数
DbCommandInterceptor() |
实现 的 IDbCommandInterceptor基类。 当接口的一个或两个方法实际上只需要任何实现时,可以使用此类。 |
方法
NonQueryExecuted(DbCommand, DbCommandInterceptionContext<Int32>) |
此方法在调用 ExecuteNonQuery() 或其异步对应项之一后调用。 可以通过设置 Result来更改实体框架使用的结果。 |
NonQueryExecuting(DbCommand, DbCommandInterceptionContext<Int32>) |
此方法在调用 ExecuteNonQuery() 或其一个异步对应项之前调用。 |
ReaderExecuted(DbCommand, DbCommandInterceptionContext<DbDataReader>) |
此方法在调用 ExecuteReader(CommandBehavior) 或其异步对应项之一后调用。 可以通过设置 Result来更改实体框架使用的结果。 |
ReaderExecuting(DbCommand, DbCommandInterceptionContext<DbDataReader>) |
此方法在调用 ExecuteReader(CommandBehavior) 或其一个异步对应项之前调用。 |
ScalarExecuted(DbCommand, DbCommandInterceptionContext<Object>) |
此方法在调用 ExecuteScalar() 或其异步对应项之一后调用。 可以通过设置 Result来更改实体框架使用的结果。 |
ScalarExecuting(DbCommand, DbCommandInterceptionContext<Object>) |
此方法在调用 ExecuteScalar() 或其一个异步对应项之前调用。 |
适用于
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈