共用方式為


DbProviderServices.DbDatabaseExists 方法

定義

多載

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

來自模型的所有存放區專案的集合。 此參數不再用於判斷資料庫存在。

傳回

如果提供者只能根據連接推算資料庫,則為 true。

適用於

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>

來自模型的所有存放區專案的集合。 此參數不再用於判斷資料庫存在。

傳回

如果提供者只能根據連接推算資料庫,則為 true。

備註

覆寫這個方法,以避免在不需要時建立存放區專案集合。 預設實作會評估延遲,並呼叫此方法的其他多載。

適用於