public ActionResult Thread(Guid id) { ThreadViewModel vm = new ThreadViewModel(); vm.ForumThread = Repository.Instance.Get<ForumThread>(id); vm.Posts = Repository.Instance.GetPostsByThreadID(id); return View(vm); }
public ActionResult Index() { ThreadViewModel vm = new ThreadViewModel(); vm.Threads = Repository.Instance.GetSortedThreads(); vm.Posts = Repository.Instance.GetAllPosts(); return View(vm); }
public ActionResult Thread(Guid id) { ThreadViewModel MyThread = new ThreadViewModel(); MyThread.Posts = Repository.Instance.GetPostbyThreadId(id); MyThread.Thread = Repository.Instance.Get<ForumThread>(id); return View(MyThread); }
// // GET: /Thread/ public ActionResult Thread(Guid id) { List<User> users = Repository.Instance.GetSortedUsers(10, 0); ViewBag.Users = users; ThreadViewModel vm = new ThreadViewModel(); vm.Thread = Repository.Instance.GetThreadById(id); vm.Posts = Repository.Instance.GetPostsByThreadID(id); return View(vm); }