Skip to content
Snippets Groups Projects
Commit 0e764a59 authored by Lucca Santangelo's avatar Lucca Santangelo
Browse files

GetPosts order by desc Date

parent f76622a0
No related branches found
No related tags found
1 merge request!31Develop
Pipeline #10382 passed
......@@ -67,6 +67,7 @@ namespace Tsi1.BusinessLayer.Services
var posts = await _context.Posts
.Where(x => x.ForumId == forumId)
.OrderByDescending(x => x.Date)
.ToListAsync();
var postDtos = _mapper.Map<List<PostPreviewDto>>(posts);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment