DbConfigurationLoadedEventArgs.AddDependencyResolver 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 to add a IDbDependencyResolver instance to the Chain of Responsibility of resolvers that are used to resolve dependencies needed by the Entity Framework.
public void AddDependencyResolver (System.Data.Entity.Infrastructure.DependencyResolution.IDbDependencyResolver resolver, bool overrideConfigFile);
member this.AddDependencyResolver : System.Data.Entity.Infrastructure.DependencyResolution.IDbDependencyResolver * bool -> unit
Public Sub AddDependencyResolver (resolver As IDbDependencyResolver, overrideConfigFile As Boolean)
Parameters
- resolver
- IDbDependencyResolver
The resolver to add.
- overrideConfigFile
- Boolean
If true, then the resolver added will take precedence over settings in the config file.
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 only exception 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, unless the overrideConfigFile is set to true in which case the resolver added here will also override config file settings.
Applies to
Entity Framework