public ActionResult Create(CreateCompetitionViewModel createCompetitionViewModel)
        {
            if (ModelState.IsValid)
            {
                CompetitionRepository competitionRepository = new CompetitionRepository(db);
                Competition           competition           = new Competition();

                competition.Name              = createCompetitionViewModel.Name;
                competition.CompetitionType   = null;
                competition.CompetitionTypeId = createCompetitionViewModel.CompetitionTypeId;
                competition.Date              = createCompetitionViewModel.Date;
                competition.TotalMoney        = 0;
                competition.CreatedAt         = DateTime.Now;
                competition.UpdatedAt         = DateTime.Now;

                competitionRepository.Insert(competition);
                competitionRepository.Commit();
                return(RedirectToAction("Index"));
            }

            CompetitionTypeRepository competitionTypeRepository = new CompetitionTypeRepository(db);

            createCompetitionViewModel.CompetitionTypes = competitionTypeRepository.GetAll().ToList();
            createCompetitionViewModel.PageTitle        = "Create Competition";
            return(View(createCompetitionViewModel));
        }