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。