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

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

            return(NoContent());
        }