DbConfiguration.AddDependencyResolver(IDbDependencyResolver) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Call this method from the constructor of a class derived from DbConfiguration to add a IDbDependencyResolver instance to the Chain of Responsibility of resolvers that are used to resolve dependencies needed by the Entity Framework.
protected internal void AddDependencyResolver (System.Data.Entity.Infrastructure.DependencyResolution.IDbDependencyResolver resolver);
member this.AddDependencyResolver : System.Data.Entity.Infrastructure.DependencyResolution.IDbDependencyResolver -> unit
Protected Friend Sub AddDependencyResolver (resolver As IDbDependencyResolver)
Parameters
- resolver
- IDbDependencyResolver
The resolver to add.
Remarks
Resolvers are asked to resolve dependencies in reverse order from which they are added. This means that a resolver can be added to override resolution of a dependency that would already have been resolved in a different way. The exceptions to this is that any dependency registered in the application's config file will always be used in preference to using a dependency resolver added here.
Applies to
Entity Framework