public ActionResult Insert(Comment newComment) { var commentService = new CommentService(); commentService.AddComment(newComment); return RedirectToAction("Index"); }
public void EditComment(Comment comment) { Comment serverComment = codeTalkContext.Comments.FirstOrDefault(t => t.Id == comment.Id); serverComment.Body = comment.Body; serverComment.DateCreated = comment.DateCreated; serverComment.DateModified = DateTime.Now; codeTalkContext.SaveChanges(); }
public ActionResult Insert(int id) { Comment comment = new Comment() { TalkId = id }; return View(comment); }
public ActionResult Edit(Comment comment) { var commentService = new CommentService(); commentService.EditComment(comment); return RedirectToAction("Index"); }
public void DeleteComment(Comment comment) { throw new NotImplementedException(); }
public void EditComment(Comment comment) { commentRepository.EditComment(comment); }
public void DeleteTalk(Comment comment) { commentRepository.DeleteComment(comment); }
public bool AddComment(Comment comment) { return commentRepository.AddComment(comment); }