private static void DropIdentityDb()
{
var connectionstring = ConfigurationManager.AppSettings.Get("MasterDb");
var dbName = ConfigurationManager.AppSettings.Get("BlogIdentityDbName");
using (var con = new SqlConnection(connectionstring))
{
con.Open();
var sqlCommandText = @"
ALTER DATABASE " + dbName + @" SET SINGLE_USER WITH ROLLBACK IMMEDIATE;
DROP DATABASE [" + dbName + "]";
var sqlCommand = new SqlCommand(sqlCommandText, con);
sqlCommand.ExecuteNonQuery();
}
}