IInterceptor Interface

Definition

The base interface for all Entity Framework interceptors.

public interface IInterceptor
type IInterceptor = interface
Public Interface IInterceptor
Derived

Remarks

Interceptors can be used to view, change, or suppress operations taken by Entity Framework. See the specific implementations of this interface for details. For example, 'IDbCommandInterceptor'.

Use AddInterceptors(IInterceptor[]) to register application interceptors.

Extensions can also register multiple IInterceptors in the internal service provider. If both injected and application interceptors are found, then the injected interceptors are run in the order that they are resolved from the service provider, and then the application interceptors are run in the order that they were added to the context.

See EF Core interceptors for more information and examples.

Applies to