Exemplo n.º 1
0
        public async Task AddTournamentAsync(AddTournamentInputModel model)
        {
            var tournament = new Tournament
            {
                Name         = model.Name,
                Image        = model.Image,
                Logo         = model.Logo,
                Status       = model.Status,
                Tier         = model.Tier,
                StartDate    = model.StartDate,
                EndDate      = model.EndDate,
                PrizePool    = model.PrizePool,
                Location     = model.Location,
                Info         = model.Info,
                TeamCapacity = model.TeamCapacity,
            };

            await this.tournamentRepository.AddAsync(tournament);

            await this.tournamentRepository.SaveChangesAsync();
        }
Exemplo n.º 2
0
        public async Task <IActionResult> Add(AddTournamentInputModel model)
        {
            await this.tournamentsService.AddTournamentAsync(model);

            return(this.Redirect("/Tournaments/All"));
        }