private void CreateChallengeStandings() { _challengeStandings.Clear(); foreach (PlayerResult playerResult in _dataView.PlayerResults) { if (!_dataView.CurrentSeason.ContainsChallenge(playerResult.ChallengeId)) { continue; } if (!_challengeStandings.ContainsKey(playerResult.ChallengeId)) { Challenge challenge = _dataView.GetChallengeById(playerResult.ChallengeId); ChallengeStanding challengeStanding = new ChallengeStanding(challenge); _challengeStandings.Add(playerResult.ChallengeId, challengeStanding); } Player foundPlayer = _dataView.Players.FirstOrDefault(p => p.Id == playerResult.PlayerId); if (foundPlayer != null) { SetChallengeStanding(playerResult, foundPlayer); } } AddChallengeStandingsWithoutPlayerResults(); ChallengeStandings.Clear(); foreach (ChallengeStanding challengeStanding in _challengeStandings.Values.OrderBy(c => c.Challenge.Difficulty)) { ChallengeStandings.Add(challengeStanding); } }