feat: show last events first

uporządkowuje listę wydarzeń według EventId malejąco
This commit is contained in:
2025-05-10 14:30:59 +02:00
parent 31f8cabeb0
commit 38e3cf06b9

View File

@@ -19,6 +19,7 @@ namespace WebApp.Endpoints
group.MapGet("/", async (ApplicationDbContext dbContext) => group.MapGet("/", async (ApplicationDbContext dbContext) =>
await dbContext.Events await dbContext.Events
.Include(Eve => Eve.Organisation) .Include(Eve => Eve.Organisation)
.OrderByDescending(Eve => Eve.EventId)
.Select(Eve => Eve.ToEventSummaryDto()) //EventSummaryDto .Select(Eve => Eve.ToEventSummaryDto()) //EventSummaryDto
.AsNoTracking() .AsNoTracking()
.ToListAsync()); .ToListAsync());