Beispiel #1
0
        public JsonResult InsertComment(CommentDto dto)
        {
            OpCommentInsert op = new OpCommentInsert();

            op.Dto        = dto;
            op.Dto.UserId = User.Identity.GetUserId();
            var result = _manager.ExecuteOperation(op);

            return(Json(result, JsonRequestBehavior.AllowGet));
        }
Beispiel #2
0
        public JsonResult AddComment(CommentDto dto)
        {
            dto.DateCreated = DateTime.Now;
            dto.UserId      = User.Identity.GetUserId();
            OpCommentInsert opI = new OpCommentInsert();

            opI.Dto = dto;
            OperationResult result   = _manager.ExecuteOperation(opI);
            var             comments = result.Items;

            return(Json(comments, JsonRequestBehavior.AllowGet));
        }