Skip to content

Commit c218f1e

Browse files
committed
Simplify LINQ query
1 parent d9636ee commit c218f1e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

SportsAnalyzer/Models/Statistics.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,7 @@ public void SetRounds(IEnumerable<int> rounds)
426426
public void SetMatches(IEnumerable<FootballMatch> matches)
427427
{
428428
AllMatches = matches?.ToList() ?? new List<FootballMatch>();
429-
LeagueRoundsNumber = AllMatches.Select(x => x.Round).Max() ?? LeagueRoundsNumber;
429+
LeagueRoundsNumber = AllMatches.Max(x => x.Round) ?? LeagueRoundsNumber;
430430
}
431431

432432
private void SetSelectedMatches()

0 commit comments

Comments
 (0)