Example #1
0
 public IActionResult Edit(ConfigurationSettingModel model)
 {
     if (ModelState.IsValid)
     {
         configurationSettingsService.Save(model);
     }
     else
     {
         return(RedirectToAction("Error", "Home"));
     }
     FlushConsigurationSettingsCache();
     return(RedirectToAction("Index"));
 }
Example #2
0
        public IActionResult Post([FromBody] ConfigurationSettingModel model)
        {
            if (ModelState.IsValid)
            {
                var result = configurationSettingsService.Save(model);

                if (result.IsSuccess)
                {
                    return(Ok());
                }
            }
            return(BadRequest());
        }