DbConfiguration.LoadConfiguration 方法 (Type)

[本页针对的是实体框架版本 6。最新版本以“实体框架”NuGet 包的形式提供。有关实体框架的更多信息,请参见 msdn.com/data/ef。]

尝试发现和加载与给定 DbContext 类型关联的 DbConfiguration。 此方法应由工具使用以确保将正确配置加载到应用程序域中。 工具应在访问 DependencyResolver 属性之前使用此方法。

命名空间:  System.Data.Entity
程序集:  EntityFramework(在 EntityFramework.dll 中)

语法

声明
Public Shared Sub LoadConfiguration ( _
    contextType As Type _
)
用法
Dim contextType As Type 

DbConfiguration.LoadConfiguration(contextType)
public static void LoadConfiguration(
    Type contextType
)
public:
static void LoadConfiguration(
    Type^ contextType
)
static member LoadConfiguration : 
        contextType:Type -> unit
public static function LoadConfiguration(
    contextType : Type
)

参数

请参阅

参考

DbConfiguration 类

LoadConfiguration 重载

System.Data.Entity 命名空间