ObjectContext.DatabaseExists 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
檢查目前儲存連線中指定的資料庫是否存在於儲存裝置中。 大部分實際工作由目前儲存連線的 DbProviderServices 實作完成。
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes")]
public virtual bool DatabaseExists();
abstract member DatabaseExists : unit -> bool
override this.DatabaseExists : unit -> bool
Public Overridable Function DatabaseExists () As Boolean
傳回
若資料庫存在則為真;否則,則為錯誤。
- 屬性