private ThreadModel GetThread(int threadId) { ThreadModel model = new ThreadModel(); model.Title = getTitle(threadId); model.Id = threadId; model.CommentSection = new CommentSectionModel(); model.CommentSection.Comments = new List<CommentModel>(); model.CommentSection.Comments.Add(GetCommentModel()); model.CommentSection.Comments.Add(GetCommentModel()); model.CommentSection.CommentForm = new CommentFormModel(); return model; }
public ActionResult Threads(int threadId) { ThreadModel model = new ThreadModel(); model.Title = getTitle(threadId); model.CommentSection = new CommentSectionModel(); model.CommentSection.Comments = new List<CommentModel>(); model.CommentSection.Comments.Add(GetCommentModel()); model.CommentSection.Comments.Add(GetCommentModel()); model.CommentSection.CommentForm = new CommentFormModel(); return View(model); }