ObjectContext.DatabaseExists Method ()

 

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.

Namespace:   System.Data.Entity.Core.Objects
Assembly:  EntityFramework (in EntityFramework.dll)

[SuppressMessageAttribute("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes")]
public virtual bool DatabaseExists()

Return Value

Type: System.Boolean

true if the database exists; otherwise, false.