Skip to content

Commit

Permalink
Version 1.0.18
Browse files Browse the repository at this point in the history
Fixed match list retrieval tro include competition metadata
  • Loading branch information
pbijdens committed Oct 13, 2024
1 parent aecea8c commit 1b4cd53
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion CentaurScores/Services/MatchRepository.cs
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,12 @@ public async Task<List<MatchModel>> FindMatches()
db.Database.EnsureCreated();

int activeID = await FetchActiveID(db);
List<MatchEntity> entities = await db.Matches.AsNoTracking().OrderByDescending(entity => entity.MatchCode).ToListAsync();
List<MatchEntity> entities = await db.Matches.AsNoTracking()
.Include(x => x.Competition)
.Where(entity => entity.Competition != null)
.OrderBy(entity => entity.Competition!.Name)
.OrderByDescending(entity => entity.MatchCode)
.ToListAsync();
List<MatchModel> result = entities.Select(x => x.ToModel()).Select(x =>
{
x.IsActiveMatch = x.Id == activeID;
Expand Down
2 changes: 1 addition & 1 deletion CentaurScores/version.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"version": "1.0.17"
"version": "1.0.18"
}

0 comments on commit 1b4cd53

Please sign in to comment.