/// <summary>
 /// Used to create a new mobile service
 /// </summary>
 /// <param name="serviceName">The name of the mobile service</param>
 /// /// <param name="sqlUsername">the name of the sql user</param>
 /// <param name="sqlPassword">The sql password</param>
 public void CreateMobileServiceWithNewDb(string serviceName, string sqlUsername, string sqlPassword)
 {
     MobileServiceName = serviceName;
     SqlAzureUsername = sqlUsername;
     SqlAzurePassword = sqlPassword;
     EnsureMobileServicesName();
     MobileServiceCommand command = new CreateMobileServiceCommand(serviceName, null)
                       {
                           SubscriptionId = SubscriptionId,
                           Certificate = ManagementCertificate
                       };
     BuildBase64Config(ref command);
     command.Execute();
     Refresh();
     // if the mobile service is not properly created we don't want to leave this lingering so delete it and all resources
     // associated with it
     if (MobileServiceState == State.UnHealthy)
     {
         Delete();
     }
 }
 /// <summary>
 /// Used to create a new mobile service
 /// </summary>
 /// <param name="serviceName">The name of the mobile service</param>
 /// /// <param name="sqlUsername">the name of the sql user</param>
 /// <param name="sqlPassword">The sql password</param>
 public void CreateMobileServiceWithNewDb(string serviceName, string sqlUsername, string sqlPassword)
 {
     MobileServiceName = serviceName;
     SqlAzureUsername = sqlUsername;
     SqlAzurePassword = sqlPassword;
     EnsureMobileServicesName();
     MobileServiceCommand command = new CreateMobileServiceCommand(serviceName, null)
                       {
                           SubscriptionId = SubscriptionId,
                           Certificate = ManagementCertificate
                       };
     BuildBase64Config(ref command);
     command.Execute();
     Refresh();
 }