public ActionResult Insert(Comment newComment) { var commentService = new CommentService(); commentService.AddComment(newComment); return RedirectToAction("Index"); }
public ActionResult Edit(Comment comment) { var commentService = new CommentService(); commentService.EditComment(comment); return RedirectToAction("Index"); }
// // GET: /Talk/ public ActionResult Index() { var commentService = new CommentService(); var comments = commentService.GetComments(); return View(comments); }
public ActionResult Edit(int id) { var commentService = new CommentService(); Comment comment = commentService.GetCommentById(id); return View(comment); }