DbContextInfo 建構函式 (Type, DbConnectionInfo)
[此頁面專屬於 Entity Framework 第 6 版。最新版本可從 'Entity Framework' NuGet 套件取得。如需 Entity Framework 的詳細資訊,請參閱 msdn.com/data/ef。]
使用指定內容類型與連接資訊,初始化 DbContextInfo 類別的新執行個體。
命名空間: System.Data.Entity.Infrastructure
組件: EntityFramework (在 EntityFramework.dll 中)
語法
'宣告
Public Sub New ( _
contextType As Type, _
connectionInfo As DbConnectionInfo _
)
'用途
Dim contextType As Type
Dim connectionInfo As DbConnectionInfo
Dim instance As New DbContextInfo(contextType, _
connectionInfo)
public DbContextInfo(
Type contextType,
DbConnectionInfo connectionInfo
)
public:
DbContextInfo(
Type^ contextType,
DbConnectionInfo^ connectionInfo
)
new :
contextType:Type *
connectionInfo:DbConnectionInfo -> DbContextInfo
public function DbContextInfo(
contextType : Type,
connectionInfo : DbConnectionInfo
)
參數
- contextType
類型:System.Type
衍生自 DbContext 的類型。
- connectionInfo
類型:System.Data.Entity.Infrastructure.DbConnectionInfo
要使用之資料庫的連接資訊。