Database.Exists Method

[This page is specific to the Entity Framework version 6. The latest version is available as the 'Entity Framework' NuGet package. For more information about Entity Framework, see msdn.com/data/ef.]

Checks whether or not the database exists on the server.

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

Syntax

'Declaration
Public Function Exists As Boolean
'Usage
Dim instance As Database 
Dim returnValue As Boolean 

returnValue = instance.Exists()
public bool Exists()
public:
bool Exists()
member Exists : unit -> bool
public function Exists() : boolean

Return Value

Type: System.Boolean
True if the database exists; false otherwise.

See Also

Reference

Database Class

Exists Overload

System.Data.Entity Namespace