예제 #1
0
        public ActionResult Forum()
        {
            ForumRepository repository = new ForumRepository();
            ICollection<ForumModel> posts = repository.GetForumBy(User.Identity.Name);

            return View(posts);
        }
예제 #2
0
        public ActionResult ReadPost(ForumModel model)
        {
            ForumRepository repository = new ForumRepository();
            repository.MarkRead(model.postId);

            return View(model);
        }
예제 #3
0
        public ActionResult ComposePost(ForumModel model)
        {
            ForumRepository repository = new ForumRepository();
            repository.AddPost(User.Identity.Name, model.title, model.content, model.courseId);

            return RedirectToAction("PostMessage");
        }