DbConfiguration.AddDefaultResolver(IDbDependencyResolver) Method

Definition

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. Unlike the AddDependencyResolver method, this method puts the resolver at the bottom of the Chain of Responsibility such that it will only be used to resolve a dependency that could not be resolved by any of the other resolvers.

protected internal void AddDefaultResolver (System.Data.Entity.Infrastructure.DependencyResolution.IDbDependencyResolver resolver);
member this.AddDefaultResolver : System.Data.Entity.Infrastructure.DependencyResolution.IDbDependencyResolver -> unit
Protected Friend Sub AddDefaultResolver (resolver As IDbDependencyResolver)

Parameters

resolver
IDbDependencyResolver

The resolver to add.

Remarks

A DbProviderServices implementation is automatically registered as a default resolver when it is added with a call to SetProviderServices(String, DbProviderServices). This allows EF providers to act as resolvers for other services that may need to be overridden by the provider.

Applies to