Пример #1
0
        public ActionResult GetComments(int lawId)
        {
            CommentsService   service = new CommentsService();
            CommentsListModel model   = service.GetCommentsForLaw(lawId, User.Identity.GetUserId(), Infrastructure.CommentOrder.Chronological);

            return(PartialView("_LawComments", model));
        }
Пример #2
0
        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));
        }