DbProviderServices.DbDatabaseExists 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
返回一个值,该值指示服务器上是否存在给定数据库,以及是否已创建 storeItemCollection 中包含的架构对象。
protected:
virtual bool DbDatabaseExists(System::Data::Common::DbConnection ^ connection, Nullable<int> commandTimeout, System::Data::Metadata::Edm::StoreItemCollection ^ storeItemCollection);
protected virtual bool DbDatabaseExists(System.Data.Common.DbConnection connection, int? commandTimeout, System.Data.Metadata.Edm.StoreItemCollection storeItemCollection);
abstract member DbDatabaseExists : System.Data.Common.DbConnection * Nullable<int> * System.Data.Metadata.Edm.StoreItemCollection -> bool
override this.DbDatabaseExists : System.Data.Common.DbConnection * Nullable<int> * System.Data.Metadata.Edm.StoreItemCollection -> bool
Protected Overridable Function DbDatabaseExists (connection As DbConnection, commandTimeout As Nullable(Of Integer), storeItemCollection As StoreItemCollection) As Boolean
参数
- connection
- DbConnection
与此方法验证其存在的数据库的连接。
- storeItemCollection
- StoreItemCollection
其存在由此方法确定的数据库的结构。
返回
true 如果连接和 storeItemCollection 参数指示的数据库存在,则为 ;否则,为 false.