共用方式為


DbProviderServices.CreateDatabase 方法

定義

建立連接所指示的資料庫,並根據 storeItemCollection 的內容, (在資料表、主鍵、外鍵) 建立架構物件。

public void CreateDatabase(System.Data.Common.DbConnection connection, Nullable<int> commandTimeout, System.Data.Entity.Core.Metadata.Edm.StoreItemCollection storeItemCollection);
member this.CreateDatabase : System.Data.Common.DbConnection * Nullable<int> * System.Data.Entity.Core.Metadata.Edm.StoreItemCollection -> unit

參數

connection
DbConnection

與不存在之資料庫的連接,需要建立這個資料庫並在其中填入 storeItemCollection 參數所表示的存放區物件。

commandTimeout
Nullable<Int32>

建立資料庫時所需之任何命令的執行逾時時間。

storeItemCollection
StoreItemCollection

建立指令碼時所應根據之所有存放區項目的集合。

適用於