Esempio n. 1
0
        public IActionResult EnableDisable(EnableDisableRaceViewModel model)
        {
            if (ModelState.IsValid)
            {
                _raceRepository.EnableDisableRace(model.Id, model.IsEnabled);

                return(RedirectToAction("Index"));
            }

            ModelState.AddModelError("", "Errore generico");

            return(View(model));
        }