IDbCommandInterceptor Interface

Definition

An object that implements this interface can be registered with DbInterception to receive notifications when Entity Framework executes commands.

public interface IDbCommandInterceptor : System.Data.Entity.Infrastructure.Interception.IDbInterceptor
type IDbCommandInterceptor = interface
    interface IDbInterceptor
Public Interface IDbCommandInterceptor
Implements IDbInterceptor
Derived
Implements

Remarks

Interceptors can also be registered in the config file of the application. See http://go.microsoft.com/fwlink/?LinkId=260883 for more information about Entity Framework configuration.

Methods

NonQueryExecuted(DbCommand, DbCommandInterceptionContext<Int32>)

This method is called after a call to ExecuteNonQuery() or one of its async counterparts is made. The result used by Entity Framework can be changed by setting Result.

NonQueryExecuting(DbCommand, DbCommandInterceptionContext<Int32>)

This method is called before a call to ExecuteNonQuery() or one of its async counterparts is made.

ReaderExecuted(DbCommand, DbCommandInterceptionContext<DbDataReader>)

This method is called after a call to ExecuteReader(CommandBehavior) or one of its async counterparts is made. The result used by Entity Framework can be changed by setting Result.

ReaderExecuting(DbCommand, DbCommandInterceptionContext<DbDataReader>)

This method is called before a call to ExecuteReader(CommandBehavior) or one of its async counterparts is made.

ScalarExecuted(DbCommand, DbCommandInterceptionContext<Object>)

This method is called after a call to ExecuteScalar() or one of its async counterparts is made. The result used by Entity Framework can be changed by setting Result.

ScalarExecuting(DbCommand, DbCommandInterceptionContext<Object>)

This method is called before a call to ExecuteScalar() or one of its async counterparts is made.

Applies to