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(); }
public async Task <IActionResult> Add(AddTournamentInputModel model) { await this.tournamentsService.AddTournamentAsync(model); return(this.Redirect("/Tournaments/All")); }