private TenantDetailsModel GetTenantDetailsModel(string applicationName, string name)
 {
     var tenantDetailsModel = default(TenantDetailsModel);
     var client = new ApplicationManagerClient();
     var headerInfo = client.GetTenantDetails(applicationName, name);
     if (headerInfo == null)
     {
         ModelState.AddModelError("TenantNotFound",
                                  string.Format("Tenant {0} in application {1} could not be found.", name,
                                                applicationName));
     }
     else
     {
         tenantDetailsModel = new TenantDetailsModel();
         tenantDetailsModel.ApplicationName = applicationName;
         tenantDetailsModel.Name = name;
         tenantDetailsModel.Url = headerInfo.Url;
         tenantDetailsModel.ContractStartTime = headerInfo.ContractStartedAt;
         tenantDetailsModel.IsActive = headerInfo.IsActive;
         tenantDetailsModel.Connections = client.GetDatabaseConfiguration(applicationName, name);
     }
     return tenantDetailsModel;
 }
        private TenantDetailsModel GetTenantDetailsModel(string applicationName, string name)
        {
            var tenantDetailsModel = default(TenantDetailsModel);
            var client             = new ApplicationManagerClient();
            var headerInfo         = client.GetTenantDetails(applicationName, name);

            if (headerInfo == null)
            {
                ModelState.AddModelError("TenantNotFound",
                                         string.Format("Tenant {0} in application {1} could not be found.", name,
                                                       applicationName));
            }
            else
            {
                tenantDetailsModel = new TenantDetailsModel();
                tenantDetailsModel.ApplicationName   = applicationName;
                tenantDetailsModel.Name              = name;
                tenantDetailsModel.Url               = headerInfo.Url;
                tenantDetailsModel.ContractStartTime = headerInfo.ContractStartedAt;
                tenantDetailsModel.IsActive          = headerInfo.IsActive;
                tenantDetailsModel.Connections       = client.GetDatabaseConfiguration(applicationName, name);
            }
            return(tenantDetailsModel);
        }