Udostępnij przez


DbCommandInterceptor Klasa

Definicja

Klasa bazowa, która implementuje IDbCommandInterceptorelement . Ta klasa jest wygodą do użycia, gdy tylko jedna lub dwie metody interfejsu rzeczywiście muszą mieć jakąkolwiek implementację.

public class DbCommandInterceptor : System.Data.Entity.Infrastructure.Interception.IDbCommandInterceptor
type DbCommandInterceptor = class
    interface IDbCommandInterceptor
    interface IDbInterceptor
Public Class DbCommandInterceptor
Implements IDbCommandInterceptor
Dziedziczenie
DbCommandInterceptor
Implementuje

Konstruktory

DbCommandInterceptor()

Klasa bazowa, która implementuje IDbCommandInterceptorelement . Ta klasa jest wygodą do użycia, gdy tylko jedna lub dwie metody interfejsu rzeczywiście muszą mieć jakąkolwiek implementację.

Metody

NonQueryExecuted(DbCommand, DbCommandInterceptionContext<Int32>)

Ta metoda jest wywoływana po wywołaniu metody ExecuteNonQuery() lub utworzeniu jednego z jego odpowiedników asynchronicznych. Wynik używany przez program Entity Framework można zmienić, ustawiając wartość Result.

NonQueryExecuting(DbCommand, DbCommandInterceptionContext<Int32>)

Ta metoda jest wywoływana przed wywołaniem metody ExecuteNonQuery() lub jednego z jej odpowiedników asynchronicznych.

ReaderExecuted(DbCommand, DbCommandInterceptionContext<DbDataReader>)

Ta metoda jest wywoływana po wywołaniu metody ExecuteReader(CommandBehavior) lub utworzeniu jednego z jego odpowiedników asynchronicznych. Wynik używany przez program Entity Framework można zmienić, ustawiając wartość Result.

ReaderExecuting(DbCommand, DbCommandInterceptionContext<DbDataReader>)

Ta metoda jest wywoływana przed wywołaniem metody ExecuteReader(CommandBehavior) lub jednego z jej odpowiedników asynchronicznych.

ScalarExecuted(DbCommand, DbCommandInterceptionContext<Object>)

Ta metoda jest wywoływana po wywołaniu metody ExecuteScalar() lub utworzeniu jednego z jego odpowiedników asynchronicznych. Wynik używany przez program Entity Framework można zmienić, ustawiając wartość Result.

ScalarExecuting(DbCommand, DbCommandInterceptionContext<Object>)

Ta metoda jest wywoływana przed wywołaniem metody ExecuteScalar() lub jednego z jej odpowiedników asynchronicznych.

Dotyczy