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
傳回
如果資料庫存在,則為 true;否則為 false。
- 屬性