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

创建脚本所应基于的所有存储项的集合。

适用于