Exemplo n.º 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);
 }
Exemplo n.º 2
0
 public ActionResult Index()
 {
     ThreadViewModel vm = new ThreadViewModel();
     vm.Threads = Repository.Instance.GetSortedThreads();
     vm.Posts = Repository.Instance.GetAllPosts();
     return View(vm);
 }
Exemplo n.º 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);
        }
Exemplo n.º 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);
 }