public DeleteDatabase ( string name, bool deleteServerIfLastDatabase = true ) : void | ||
name | string | |
deleteServerIfLastDatabase | bool | |
Résultat | void |
/// <summary> /// Deletes a mobile service along with any linked database server /// </summary> 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(); }
/// <summary> /// Deletes a mobile service along with any linked database server /// </summary> 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(); }