DbProviderServices.DatabaseExists 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
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
与通过此方法检查其存在的数据库的连接。
- 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
与通过此方法检查其存在的数据库的连接。
- storeItemCollection
- Lazy<StoreItemCollection>
模型中所有存储项的集合。 此参数不再用于确定数据库是否存在。
返回
如果提供程序仅基于连接就可推导数据库,则为 true。