public ActionResult Forum() { ForumRepository repository = new ForumRepository(); ICollection<ForumModel> posts = repository.GetForumBy(User.Identity.Name); return View(posts); }
public ActionResult ReadPost(ForumModel model) { ForumRepository repository = new ForumRepository(); repository.MarkRead(model.postId); return View(model); }
public ActionResult ComposePost(ForumModel model) { ForumRepository repository = new ForumRepository(); repository.AddPost(User.Identity.Name, model.title, model.content, model.courseId); return RedirectToAction("PostMessage"); }