語言

DbProviderServices.DbDatabaseExists 方法

定義

多載

名稱 Description
DbDatabaseExists(DbConnection, Nullable<Int32>, StoreItemCollection)

回傳一個值,表示該資料庫是否存在於伺服器上。

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

回傳一個值,表示該資料庫是否存在於伺服器上。

DbDatabaseExists(DbConnection, Nullable<Int32>, StoreItemCollection)

回傳一個值,表示該資料庫是否存在於伺服器上。

protected virtual bool DbDatabaseExists(System.Data.Common.DbConnection connection, Nullable<int> commandTimeout, System.Data.Entity.Core.Metadata.Edm.StoreItemCollection storeItemCollection);
abstract member DbDatabaseExists : System.Data.Common.DbConnection * Nullable<int> * System.Data.Entity.Core.Metadata.Edm.StoreItemCollection -> bool
override this.DbDatabaseExists : System.Data.Common.DbConnection * Nullable<int> * System.Data.Entity.Core.Metadata.Edm.StoreItemCollection -> bool

參數

connection
DbConnection

連接到一個資料庫,該資料庫的存在會被此方法檢查。

commandTimeout
Nullable<Int32>

執行逾時,適用於判斷資料庫存在所需的指令。

storeItemCollection
StoreItemCollection

模型中所有商店物品的集合。 此參數已不再用於判定資料庫存在。

傳回

如果提供者只能根據連線推斷資料庫,那就成立。

適用於

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

回傳一個值,表示該資料庫是否存在於伺服器上。

protected virtual bool DbDatabaseExists(System.Data.Common.DbConnection connection, Nullable<int> commandTimeout, Lazy<System.Data.Entity.Core.Metadata.Edm.StoreItemCollection> storeItemCollection);
abstract member DbDatabaseExists : System.Data.Common.DbConnection * Nullable<int> * Lazy<System.Data.Entity.Core.Metadata.Edm.StoreItemCollection> -> bool
override this.DbDatabaseExists : System.Data.Common.DbConnection * Nullable<int> * Lazy<System.Data.Entity.Core.Metadata.Edm.StoreItemCollection> -> bool
Protected Overridable Function DbDatabaseExists (connection As DbConnection, commandTimeout As Nullable(Of Integer), storeItemCollection As Lazy(Of StoreItemCollection)) As Boolean

參數

connection
DbConnection

連接到一個資料庫,該資料庫的存在會被此方法檢查。

commandTimeout
Nullable<Int32>

執行逾時,適用於判斷資料庫存在所需的指令。

storeItemCollection
Lazy<StoreItemCollection>

模型中所有商店物品的集合。 此參數已不再用於判定資料庫存在。

傳回

如果提供者只能根據連線推斷資料庫,那就成立。

備註

如果不需要,可以避免建立商店物品收集,可以覆寫此方法。 預設實作會評估 Lazy 並呼叫此方法的另一個超載。

適用於