ObjectContext.DatabaseExists Method

Definition

Checks if the database that is specified as the database in the current store connection exists on the store. Most of the actual work is done by the DbProviderServices implementation for the current store connection.

[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

Returns

true if the database exists; otherwise, false.

Attributes

Applies to