Share via


DbConfiguration.LoadConfiguration Method

Definition

Overloads

LoadConfiguration(Type)

Attempts to discover and load the DbConfiguration associated with the given DbContext type. This method is intended to be used by tooling to ensure that the correct configuration is loaded into the app domain. Tooling should use this method before accessing the DependencyResolver property.

LoadConfiguration(Assembly)

Attempts to discover and load the DbConfiguration from the given assembly. This method is intended to be used by tooling to ensure that the correct configuration is loaded into the app domain. Tooling should use this method before accessing the DependencyResolver property. If the tooling knows the DbContext type being used, then the LoadConfiguration(Type) method should be used since it gives a greater chance that the correct configuration will be found.

LoadConfiguration(Type)

Attempts to discover and load the DbConfiguration associated with the given DbContext type. This method is intended to be used by tooling to ensure that the correct configuration is loaded into the app domain. Tooling should use this method before accessing the DependencyResolver property.

public static void LoadConfiguration (Type contextType);
static member LoadConfiguration : Type -> unit
Public Shared Sub LoadConfiguration (contextType As Type)

Parameters

contextType
Type

A DbContext type to use for configuration discovery.

Applies to

LoadConfiguration(Assembly)

Attempts to discover and load the DbConfiguration from the given assembly. This method is intended to be used by tooling to ensure that the correct configuration is loaded into the app domain. Tooling should use this method before accessing the DependencyResolver property. If the tooling knows the DbContext type being used, then the LoadConfiguration(Type) method should be used since it gives a greater chance that the correct configuration will be found.

public static void LoadConfiguration (System.Reflection.Assembly assemblyHint);
static member LoadConfiguration : System.Reflection.Assembly -> unit
Public Shared Sub LoadConfiguration (assemblyHint As Assembly)

Parameters

assemblyHint
Assembly

An Assembly to use for configuration discovery.

Applies to