Example #1
0
 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);
 }
Example #2
0
 public ActionResult Index()
 {
     ThreadViewModel vm = new ThreadViewModel();
     vm.Threads = Repository.Instance.GetSortedThreads();
     vm.Posts = Repository.Instance.GetAllPosts();
     return View(vm);
 }
Example #3
0
        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);
        }
Example #4
0
 //
 // 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);
 }