public IActionResult SortByDateAsc(Forum forum) { var sortedPostsByForum = _forum.GetAscDateSortedPostsByForum(forum.Id); var model = new TopicViewModel { Forum = forum, Posts = sortedPostsByForum }; return(View("Topic", model)); }
public List <Post> GetAscDateSortedPostsByForum(int id) { var returnedList = _context.GetAscDateSortedPostsByForum(id); return(GetUsersByPost(returnedList)); }