DbConfiguration.AddInterceptor Method (IDbInterceptor)
Registers an IDbInterceptor at application startup. Note that interceptors can also be added and removed at any time using DbInterception.
Assembly: EntityFramework (in EntityFramework.dll)
Parameters
- interceptor
-
Type:
System.Data.Entity.Infrastructure.Interception.IDbInterceptor
The interceptor to register.
This method is provided as a convenient and discoverable way to add configuration to the Entity Framework. Internally it works in the same way as using AddDependencyResolver to add an appropriate resolver for IDbInterceptor. This means that, if desired, the same functionality can be achieved using a custom resolver or a resolver backed by an Inversion-of-Control container.