예제 #1
0
 public TournamentViewModel(int tournamentID)
 {
     Tournament              = GetTournament(tournamentID);
     _rounds                 = CalculateNumberOfRounds(Tournament.EnteredTeams.Count);
     AllMatchups             = Tournament.Matchups.ToList();
     UpdateTournamentCommand = new UpdateTournamentCommand();
     AdvanceWinnersCommand   = new AdvanceWinnersCommand();
     Rounds   = GetRounds(AllMatchups);
     Matchups = Rounds[0];
 }
 public async Task <ActionResult <UpdateTournamentResult> > UpdateTournament([FromBody] UpdateTournamentCommand updateTournamentCommand)
 {
     return(await _mediator.Send(updateTournamentCommand));
 }