Database.Delete 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]

Deletes the database on the database server if it exists, otherwise does nothing. Calling this method from outside of an initializer will mark the database as having not been initialized. This means that if an attempt is made to use the database again after it has been deleted, then any initializer set will run again and, usually, will try to create the database again automatically.

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

public bool Delete()

Return Value

Type: System.Boolean
True if the database did exist and was deleted; false otherwise.