Skip to content

Commit

Permalink
Refactor ConferenceService to order rooms by priority when including …
Browse files Browse the repository at this point in the history
…them (#80)
  • Loading branch information
ceciliasharp authored Sep 15, 2024
1 parent efe283b commit 68f14fe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ConferenceService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public ConferenceService(SwetuggContext context, IMemoryCache cache)
public Conference? Get(string slug) =>
ReadThroughCache<Conference?>($"conference-{slug.ToLower()}", () => _context.Conferences
.AsSplitQuery()
.Include(c => c.Rooms)
.Include(c => c.Rooms.OrderBy(c => c.Priority))
.Include(c => c.Sessions.Where(s => s.Published))
.ThenInclude(c => c.Speakers.Where(s => s.Published))
.ThenInclude(s => s.SpeakerImages)
Expand Down

0 comments on commit 68f14fe

Please sign in to comment.