DbConfiguration.LoadConfiguration 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.
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
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
Applies to
Entity Framework