Exemple #1
0
        public IActionResult Create(RaceCreateViewModel model)
        {
            if (!ModelState.IsValid)
            {
                return(View(model));
            }
            work.RaceRepository.Create(RaceModel.GenerateRaceDTOFromModel(model.Race));
            work.Save();

            return(RedirectToAction("Index"));
        }