DbInterception DbInterception DbInterception Class


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


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.


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