private TenantSetting GetTenantSettingModel(Guid providerId, TenantSettingModel settings)
 {
     return(new TenantSetting
     {
         Settings = JsonConvert.SerializeObject(settings),
         TenantId = providerId
     });
 }
 public async Task UpdateTenantSettings(Guid providerId, TenantSettingModel settings)
 {
     try
     {
         await _tenantsSettingRepository.UpdateAsync(GetTenantSettingModel(providerId, settings));
     }
     catch (KeyNotFoundException)
     {
         throw;
     }
 }
        public async Task <IActionResult> UpdateTenantSettingById(Guid tenantId, TenantSettingModel settings)
        {
            try
            {
                await _tenantSettingManager.UpdateTenantSettings(tenantId, settings);

                return(NoContent());
            }
            catch (KeyNotFoundException)
            {
                return(NotFound());
            }
        }
 public async Task InsertTenantSettings(Guid providerId, TenantSettingModel settings)
 {
     await _tenantsSettingRepository.AddAsync(GetTenantSettingModel(providerId, settings));
 }
        public async Task <IActionResult> PostTenantSetting(Guid tenantId, [FromBody] TenantSettingModel settings)
        {
            await _tenantSettingManager.InsertTenantSettings(tenantId, settings);

            return(NoContent());
        }