コード例 #1
0
ファイル: CommentController.cs プロジェクト: robzelt/CodeTalk
        public ActionResult Insert(Comment newComment)
        {
            var commentService = new CommentService();
            commentService.AddComment(newComment);

            return RedirectToAction("Index");
        }
コード例 #2
0
ファイル: CommentController.cs プロジェクト: robzelt/CodeTalk
 public ActionResult Edit(Comment comment)
 {
     var commentService = new CommentService();
     commentService.EditComment(comment);
     return RedirectToAction("Index");
 }
コード例 #3
0
ファイル: CommentController.cs プロジェクト: robzelt/CodeTalk
 //
 // GET: /Talk/
 public ActionResult Index()
 {
     var commentService = new CommentService();
     var comments = commentService.GetComments();
     return View(comments);
 }
コード例 #4
0
ファイル: CommentController.cs プロジェクト: robzelt/CodeTalk
 public ActionResult Edit(int id)
 {
     var commentService = new CommentService();
     Comment comment = commentService.GetCommentById(id);
     return View(comment);
 }