Exemple #1
0
        public IActionResult SortByDateAsc(Forum forum)
        {
            var sortedPostsByForum = _forum.GetAscDateSortedPostsByForum(forum.Id);
            var model = new TopicViewModel
            {
                Forum = forum,
                Posts = sortedPostsByForum
            };

            return(View("Topic", model));
        }
Exemple #2
0
        public List <Post> GetAscDateSortedPostsByForum(int id)
        {
            var returnedList = _context.GetAscDateSortedPostsByForum(id);

            return(GetUsersByPost(returnedList));
        }