mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-07-28 16:08:38 +00:00
Order photos by timestamp on website
This commit is contained in:
parent
2b5f91c1cd
commit
68d7433875
1 changed files with 6 additions and 1 deletions
|
@ -28,7 +28,12 @@ namespace LBPUnion.ProjectLighthouse.Pages
|
|||
|
||||
this.PageNumber = pageNumber;
|
||||
|
||||
this.Photos = await this.Database.Photos.Include(p => p.Creator).Skip(pageNumber * pageSize).Take(pageSize).ToListAsync();
|
||||
this.Photos = await this.Database.Photos.Include
|
||||
(p => p.Creator)
|
||||
.OrderByDescending(p => p.Timestamp)
|
||||
.Skip(pageNumber * pageSize)
|
||||
.Take(pageSize)
|
||||
.ToListAsync();
|
||||
|
||||
return this.Page();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue