DbProviderServices.DbCreateDatabase メソッド
[このページは、Entity Framework 6 に関するページです。最新バージョンは、'Entity Framework' NuGet パッケージとして入手できます。Entity Framework の詳細については、msdn.com/data/ef を参照してください。]
接続で示されるデータベースを作成し、StoreItemCollection の内容に基づくスキーマ オブジェクト (テーブル、主キー、外部キー) を作成します。
名前空間: System.Data.Entity.Core.Common
アセンブリ: EntityFramework (EntityFramework.dll 内)
構文
'宣言
Protected Overridable Sub DbCreateDatabase ( _
connection As DbConnection, _
commandTimeout As Nullable(Of Integer), _
storeItemCollection As StoreItemCollection _
)
'使用
Dim connection As DbConnection
Dim commandTimeout As Nullable(Of Integer)
Dim storeItemCollection As StoreItemCollection
Me.DbCreateDatabase(connection, commandTimeout, _
storeItemCollection)
protected virtual void DbCreateDatabase(
DbConnection connection,
Nullable<int> commandTimeout,
StoreItemCollection storeItemCollection
)
protected:
virtual void DbCreateDatabase(
DbConnection^ connection,
Nullable<int> commandTimeout,
StoreItemCollection^ storeItemCollection
)
abstract DbCreateDatabase :
connection:DbConnection *
commandTimeout:Nullable<int> *
storeItemCollection:StoreItemCollection -> unit
override DbCreateDatabase :
connection:DbConnection *
commandTimeout:Nullable<int> *
storeItemCollection:StoreItemCollection -> unit
protected function DbCreateDatabase(
connection : DbConnection,
commandTimeout : Nullable<int>,
storeItemCollection : StoreItemCollection
)
パラメーター
- connection
型 : System.Data.Common.DbConnection
作成して、storeItemCollection パラメーターで示されるストア オブジェクトを設定する必要がある、存在しないデータベースへの接続。
- commandTimeout
型 : System.Nullable<Int32>
データベースの作成に必要なすべてのコマンドの実行タイムアウト。
- storeItemCollection
型 : System.Data.Entity.Core.Metadata.Edm.StoreItemCollection
作成するスクリプトの基となるすべてのストア アイテムのコレクション。