Database.Delete Method (DbConnection)

[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.

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

public static bool Delete(
	DbConnection existingConnection


Type: System.Data.Common.DbConnection
An existing connection to the database.

Return Value

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