From 2b9b96ac678330a20644c46950b7f8d797c19301 Mon Sep 17 00:00:00 2001 From: Simon Schulze Date: Mon, 13 Jan 2025 12:43:25 +0100 Subject: [PATCH] [B] Fix season results query failing --- src/iRLeagueApiCore.Client/iRLeagueApiCore.Client.csproj | 2 +- src/iRLeagueApiCore.Common/iRLeagueApiCore.Common.csproj | 2 +- .../Handlers/Results/GetResultsFromSeasonHandler.cs | 5 +++-- src/iRLeagueApiCore.Server/iRLeagueApiCore.Server.csproj | 2 +- src/iRLeagueDatabaseCore/iRLeagueDatabaseCore.csproj | 2 +- 5 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/iRLeagueApiCore.Client/iRLeagueApiCore.Client.csproj b/src/iRLeagueApiCore.Client/iRLeagueApiCore.Client.csproj index 7ed7a405..fb04c894 100644 --- a/src/iRLeagueApiCore.Client/iRLeagueApiCore.Client.csproj +++ b/src/iRLeagueApiCore.Client/iRLeagueApiCore.Client.csproj @@ -13,7 +13,7 @@ Library net8.0 iRLeagueApiCore.Client - 0.14.5 + 0.14.6 Simon Schulze Simon Schulze This package contains shared objects for all members of the iRLeagueDatabase-iRLeagueApi stack diff --git a/src/iRLeagueApiCore.Common/iRLeagueApiCore.Common.csproj b/src/iRLeagueApiCore.Common/iRLeagueApiCore.Common.csproj index 7855177b..ce1a59fc 100644 --- a/src/iRLeagueApiCore.Common/iRLeagueApiCore.Common.csproj +++ b/src/iRLeagueApiCore.Common/iRLeagueApiCore.Common.csproj @@ -18,7 +18,7 @@ Library net8.0 iRLeagueApiCore.Common - 0.14.5 + 0.14.6 Simon Schulze Simon Schulze enable diff --git a/src/iRLeagueApiCore.Server/Handlers/Results/GetResultsFromSeasonHandler.cs b/src/iRLeagueApiCore.Server/Handlers/Results/GetResultsFromSeasonHandler.cs index a7989286..ebd0cb52 100644 --- a/src/iRLeagueApiCore.Server/Handlers/Results/GetResultsFromSeasonHandler.cs +++ b/src/iRLeagueApiCore.Server/Handlers/Results/GetResultsFromSeasonHandler.cs @@ -23,13 +23,14 @@ public override async Task> Handle(GetResult private async Task> MapToGetResultModelsFromSeasonAsync(long seasonId, CancellationToken cancellationToken) { - var seasonResults = await dbContext.ScoredEventResults + var seasonResults = (await dbContext.ScoredEventResults .Where(x => x.Event.Schedule.SeasonId == seasonId) .OrderBy(x => x.ResultConfigId) .Select(MapToEventResultModelExpression) .OrderBy(x => x.Index) + .ToListAsync(cancellationToken)) .OrderBy(x => x.Date) - .ToListAsync(cancellationToken); + .ToList(); var groupedResults = seasonResults.GroupBy(x => x.EventId); var seasonEventResults = groupedResults.Select(x => new SeasonEventResultModel() diff --git a/src/iRLeagueApiCore.Server/iRLeagueApiCore.Server.csproj b/src/iRLeagueApiCore.Server/iRLeagueApiCore.Server.csproj index 140061db..0f38ae24 100644 --- a/src/iRLeagueApiCore.Server/iRLeagueApiCore.Server.csproj +++ b/src/iRLeagueApiCore.Server/iRLeagueApiCore.Server.csproj @@ -78,7 +78,7 @@ true - 0.14.5 + 0.14.6 enable diff --git a/src/iRLeagueDatabaseCore/iRLeagueDatabaseCore.csproj b/src/iRLeagueDatabaseCore/iRLeagueDatabaseCore.csproj index e60ddd2d..8e40a3d7 100644 --- a/src/iRLeagueDatabaseCore/iRLeagueDatabaseCore.csproj +++ b/src/iRLeagueDatabaseCore/iRLeagueDatabaseCore.csproj @@ -35,7 +35,7 @@ net8.0 12 iRLeagueDatabaseCore - 0.14.5 + 0.14.6 enable