Exemple #1
0
        public IActionResult ChangeStatus(LanguageCreateViewModel model)
        {
            var response = _localizationService.ChangeStatusOfLanguage(model);

            if (!response.IsSuccess)
            {
                foreach (var err in response.Errors)
                {
                    ModelState.AddModelError(err.Key, err.Message);
                }

                return(View(model));
            }

            return(RedirectToAction("GetLanguages", "Localization", new { page = 1, perPage = 10 }));
        }