public ActionResult Create() { this.AddLookups(); var tournament = new DTO.Tournaments.Tournament(); tournament.StartOfRegistration = DateTime.UtcNow.AddDays(1); tournament.StartOfTournament = DateTime.UtcNow.AddDays(2); tournament.MapTemplates = new string[0]; tournament.Options = new DTO.Games.GameOptions { NumberOfTeams = 2 }; GameOptionsHelper.SetDefaultGameOptions(tournament.Options); ViewBag.FixedOptions = new HashSet <string> { "NumberOfTeams" }; return(View(tournament)); }
public ActionResult PostCreate(DTO.Tournaments.Tournament tournament) { this.tournamentService.Create(tournament); return(this.Redirect("Index")); }