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

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

            return View(model);
        }
Example #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");
        }