DbConfiguration.LoadConfiguration 方法 (Assembly)
[本页针对的是实体框架版本 6。最新版本以“实体框架”NuGet 包的形式提供。有关实体框架的更多信息,请参见 msdn.com/data/ef。]
尝试从给定程序集发现和加载 DbConfiguration。 此方法应由工具使用以确保将正确配置加载到应用程序域中。 工具应在访问 DependencyResolver 属性之前使用此方法。 如果工具知道要使用的 DbContext 类型,则应使用 LoadConfiguration(Type) 方法,因为这会增加找到正确配置的机会。
命名空间: System.Data.Entity
程序集: EntityFramework(在 EntityFramework.dll 中)
语法
声明
Public Shared Sub LoadConfiguration ( _
assemblyHint As Assembly _
)
用法
Dim assemblyHint As [Assembly]
DbConfiguration.LoadConfiguration(assemblyHint)
public static void LoadConfiguration(
Assembly assemblyHint
)
public:
static void LoadConfiguration(
Assembly^ assemblyHint
)
static member LoadConfiguration :
assemblyHint:Assembly -> unit
public static function LoadConfiguration(
assemblyHint : Assembly
)
参数
- assemblyHint
类型:System.Reflection.Assembly
要用于配置发现的 Assembly。