示例#1
0
 public IActionResult SetWinner(long teamId, int roundId)
 {
     try
     {
         var team = AllTeamRepository.GetById(teamId);
         var ts   = new TournamentService(AllTournamentRepository, AllTeamRepository);
         ts.SetWinner(team, roundId);
         return(RedirectToAction(nameof(Current)));
     }
     catch (ArgumentException e)
     {
         TempData["MsgError"] = e.Message;
     }
     return(RedirectToAction(nameof(Current)));
 }
示例#2
0
 public Team Get(long id)
 {
     return(_allTeam.GetById(id));
 }