예제 #1
0
        public IActionResult ThreadPage(int threadID)
        {
            forumThread = forumThreadCollection.GetForumThread(threadID);
            account     = accountCollection.GetAccount(forumThread.AccountID);
            List <IForumPost> forumPosts = forumPostCollection.GetForumPosts(threadID);

            ForumThreadViewModel model = new ForumThreadViewModel()
            {
                ThreadID          = forumThread.ThreadID,
                ThreadCreator     = account,
                ThreadTitle       = forumThread.ThreadTitle,
                ThreadMessage     = forumThread.ThreadMessage,
                ThreadDateCreated = forumThread.ThreadDateCreated,
                Posts             = forumPosts
            };

            return(View(model));
        }