Esempio n. 1
0
        public ActionResult Insert(Comment newComment)
        {
            var commentService = new CommentService();
            commentService.AddComment(newComment);

            return RedirectToAction("Index");
        }
Esempio n. 2
0
 public ActionResult Edit(Comment comment)
 {
     var commentService = new CommentService();
     commentService.EditComment(comment);
     return RedirectToAction("Index");
 }
Esempio n. 3
0
 //
 // GET: /Talk/
 public ActionResult Index()
 {
     var commentService = new CommentService();
     var comments = commentService.GetComments();
     return View(comments);
 }
Esempio n. 4
0
 public ActionResult Edit(int id)
 {
     var commentService = new CommentService();
     Comment comment = commentService.GetCommentById(id);
     return View(comment);
 }