Exemple #1
0
 public Tournament GetTourById(int id)
 {
     try
     {
         Tournament tournament = _tourRepo.ReadTourById(id);
         _tourVali.CheckIfTournamentIsNull(tournament);
         if (!tournament.IsDone || DateTime.Compare(tournament.StartDate, DateTime.Now) <= 0)
         {
             _pointCalc.CalculateTournamentPoints(tournament);
             tournament.Participants.OrderByDescending(ut => ut.TotalUserPoints);
         }
         return(tournament);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }