Class EFCommandInterceptor
Inheritance
Assembly: Alachisoft.Integrations.EntityFramework.CachingProvider.dll
Syntax
public class EFCommandInterceptor : IDbCommandInterceptor
Constructors
EFCommandInterceptor()
The constructor to initialize the logger and application instance.
Declaration
public EFCommandInterceptor()
Methods
Finalize()
This method performs the application-defined tasks associated with the freeing, releasing, or resetting of unmanaged resources.
Declaration
protected void Finalize()
NonQueryExecuted(System.Data.Common.DbCommand, DbCommandInterceptionContext<Int32>)
This method is called after a call to ExecuteNonQuery() or one of its async counterparts is made.
Declaration
public void NonQueryExecuted(System.Data.Common.DbCommand command, DbCommandInterceptionContext<int> interceptionContext)
Parameters
Type | Name | Description |
---|---|---|
System.Data.Common.DbCommand | command | The command being executed. |
DbCommandInterceptionContext<System.Int32> | interceptionContext | The contextual information associated with the call. |
NonQueryExecuting(System.Data.Common.DbCommand, DbCommandInterceptionContext<Int32>)
This method is called before a call to ExecuteNonQuery() or one of its async counterparts is made.
Declaration
public void NonQueryExecuting(System.Data.Common.DbCommand command, DbCommandInterceptionContext<int> interceptionContext)
Parameters
Type | Name | Description |
---|---|---|
System.Data.Common.DbCommand | command | The command being executed. |
DbCommandInterceptionContext<System.Int32> | interceptionContext | The contextual information associated with the call. |
ReaderExecuted(System.Data.Common.DbCommand, DbCommandInterceptionContext<System.Data.Common.DbDataReader>)
This method is called after a call to ExecuteReader(CommandBehavior) or one of its async counterparts is made.
Declaration
public void ReaderExecuted(System.Data.Common.DbCommand command, DbCommandInterceptionContext<System.Data.Common.DbDataReader> interceptionContext)
Parameters
Type | Name | Description |
---|---|---|
System.Data.Common.DbCommand | command | The command being executed. |
DbCommandInterceptionContext<System.Data.Common.DbDataReader> | interceptionContext | The contextual information associated with the call. |
ReaderExecuting(System.Data.Common.DbCommand, DbCommandInterceptionContext<System.Data.Common.DbDataReader>)
This method is called before a call to ExecuteReader(CommandBehavior) or one of its async counterparts is made.
Declaration
public void ReaderExecuting(System.Data.Common.DbCommand command, DbCommandInterceptionContext<System.Data.Common.DbDataReader> interceptionContext)
Parameters
Type | Name | Description |
---|---|---|
System.Data.Common.DbCommand | command | The command being executed. |
DbCommandInterceptionContext<System.Data.Common.DbDataReader> | interceptionContext | The contextual information associated with the call. |
ScalarExecuted(System.Data.Common.DbCommand, DbCommandInterceptionContext<Object>)
This method is called after a call to ExecuteScalar() or one of its async counterparts is made.
Declaration
public void ScalarExecuted(System.Data.Common.DbCommand command, DbCommandInterceptionContext<object> interceptionContext)
Parameters
Type | Name | Description |
---|---|---|
System.Data.Common.DbCommand | command | The command being executed. |
DbCommandInterceptionContext<System.Object> | interceptionContext | The contextual information associated with the call. |
ScalarExecuting(System.Data.Common.DbCommand, DbCommandInterceptionContext<Object>)
This method is called before a call to ExecuteScalar() or one of its async counterparts is made.
Declaration
public void ScalarExecuting(System.Data.Common.DbCommand command, DbCommandInterceptionContext<object> interceptionContext)
Parameters
Type | Name | Description |
---|---|---|
System.Data.Common.DbCommand | command | The command being executed. |
DbCommandInterceptionContext<System.Object> | interceptionContext | The contextual information associated with the call. |