DbProviderServices.DatabaseExists 方法

定义

重载

DatabaseExists(DbConnection, Nullable<Int32>, StoreItemCollection)

返回一个值,该值指示服务器上是否存在给定数据库。

DatabaseExists(DbConnection, Nullable<Int32>, Lazy<StoreItemCollection>)

返回一个值,该值指示服务器上是否存在给定数据库。

DatabaseExists(DbConnection, Nullable<Int32>, StoreItemCollection)

返回一个值,该值指示服务器上是否存在给定数据库。

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

参数

connection
DbConnection

与通过此方法检查其存在的数据库的连接。

commandTimeout
Nullable<Int32>

确定数据库是否存在所需的任何命令的执行超时。

storeItemCollection
StoreItemCollection

模型中所有存储项的集合。 此参数不再用于确定数据库是否存在。

返回

如果提供程序仅基于连接就可推导数据库,则为 true。

适用于

DatabaseExists(DbConnection, Nullable<Int32>, Lazy<StoreItemCollection>)

返回一个值,该值指示服务器上是否存在给定数据库。

public bool DatabaseExists (System.Data.Common.DbConnection connection, Nullable<int> commandTimeout, Lazy<System.Data.Entity.Core.Metadata.Edm.StoreItemCollection> storeItemCollection);
member this.DatabaseExists : System.Data.Common.DbConnection * Nullable<int> * Lazy<System.Data.Entity.Core.Metadata.Edm.StoreItemCollection> -> bool
Public Function DatabaseExists (connection As DbConnection, commandTimeout As Nullable(Of Integer), storeItemCollection As Lazy(Of StoreItemCollection)) As Boolean

参数

connection
DbConnection

与通过此方法检查其存在的数据库的连接。

commandTimeout
Nullable<Int32>

确定数据库是否存在所需的任何命令的执行超时。

storeItemCollection
Lazy<StoreItemCollection>

模型中所有存储项的集合。 此参数不再用于确定数据库是否存在。

返回

如果提供程序仅基于连接就可推导数据库,则为 true。

适用于