DbContextInfo 构造函数 (Type, Configuration, DbProviderInfo)
[本页针对的是实体框架版本 6。最新版本以“实体框架”NuGet 包的形式提供。有关实体框架的更多信息,请参见 msdn.com/data/ef。]
使用指定上下文类型、配置文件和提供程序信息初始化 DbContextInfo 类的新实例。
命名空间: System.Data.Entity.Infrastructure
程序集: EntityFramework(在 EntityFramework.dll 中)
语法
声明
Public Sub New ( _
contextType As Type, _
config As Configuration, _
modelProviderInfo As DbProviderInfo _
)
用法
Dim contextType As Type
Dim config As Configuration
Dim modelProviderInfo As DbProviderInfo
Dim instance As New DbContextInfo(contextType, _
config, modelProviderInfo)
public DbContextInfo(
Type contextType,
Configuration config,
DbProviderInfo modelProviderInfo
)
public:
DbContextInfo(
Type^ contextType,
Configuration^ config,
DbProviderInfo^ modelProviderInfo
)
new :
contextType:Type *
config:Configuration *
modelProviderInfo:DbProviderInfo -> DbContextInfo
public function DbContextInfo(
contextType : Type,
config : Configuration,
modelProviderInfo : DbProviderInfo
)
参数
- contextType
类型:System.Type
派生自 DbContext 的类型。
- config
类型:System.Configuration.Configuration
表示配置文件的对象。
- modelProviderInfo
类型:System.Data.Entity.Infrastructure.DbProviderInfo
指定要面向的基础 ADO.NET 提供程序的 DbProviderInfo。