Ejemplo n.º 1
0
        public IActionResult AddParticipant(ContestViewModel model)
        {
            var participant = new Participant();

            participant.ContestId = model.Id;
            participant.Name      = model.Participant.Name;
            _participantRepository.Add(participant);
            _participantRepository.Commit();

            return(RedirectToAction("Contest", "Home", new { id = model.Id }));
        }