public void Delete(bool deleteSqlAzureDatabase = true)
{
// when this succeeds ... we'll delete the db if this is still around
// TODO: Add the delete database and server by extending the client
if (deleteSqlAzureDatabase)
{
var client = new SqlDatabaseClient(SubscriptionId, ManagementCertificate, SqlAzureServerName)
{
AdministratorServerLogin = SqlAzureUsername,
AdministratorServerPassword = SqlAzurePassword,
};
client.DeleteDatabase(SqlAzureDbName, deleteSqlAzureDatabase);
}
// first we'll delete the mobile service
var command = new DeleteMobileServiceCommand(MobileServiceName)
{
SubscriptionId = SubscriptionId,
Certificate = ManagementCertificate
};
command.Execute();
}