public ActionResult GetComments(int lawId) { CommentsService service = new CommentsService(); CommentsListModel model = service.GetCommentsForLaw(lawId, User.Identity.GetUserId(), Infrastructure.CommentOrder.Chronological); return(PartialView("_LawComments", model)); }
public ActionResult AddComment(int lawId, CommentModel comment) { TryUpdateModel(comment); CommentsService service = new CommentsService(); service.MakeComment(lawId, User.Identity.GetUserId(), comment.Comment.Text); CommentsListModel model = service.GetCommentsForLaw(lawId, User.Identity.GetUserId(), Infrastructure.CommentOrder.Chronological); return(PartialView("_LawComments", model)); }