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))); }
public Team Get(long id) { return(_allTeam.GetById(id)); }