DbInterception DbInterception DbInterception Class

Definition

This is the registration point for IDbInterceptor interceptors. Interceptors receive notifications when EF performs certain operations such as executing commands against the database. For example, see IDbCommandInterceptor.

public static class DbInterception
type DbInterception = class
Public Class DbInterception
Inheritance
DbInterceptionDbInterceptionDbInterception

Properties

Dispatch Dispatch Dispatch

This is the entry point for dispatching to interceptors. This is usually only used internally by Entity Framework but it is provided publicly so that other code can make sure that registered interceptors are called when operations are performed on behalf of EF. For example, EF providers a may make use of this when executing commands.

Methods

Add(IDbInterceptor) Add(IDbInterceptor) Add(IDbInterceptor)

Registers a new IDbInterceptor to receive notifications. Note that the interceptor must implement some interface that extends from IDbInterceptor to be useful.

Remove(IDbInterceptor) Remove(IDbInterceptor) Remove(IDbInterceptor)

Removes a registered IDbInterceptor so that it will no longer receive notifications. If the given interceptor is not registered, then this is a no-op.

Applies to