public ActionResult AddComment(CommentModel item) { var comment = new Comment(); comment.Text = item.Text; comment.ParentId = item.ParentId; comment.PrNumber = item.PrNumber; comment.UserId = "123-456-789"; CommentAppService commentAppService = new CommentAppService(); var a = commentAppService.Add(comment); return(Json("Success", JsonRequestBehavior.AllowGet)); }
public ActionResult AddComment(CommentModel item) { var comment = new Comment(); comment.Text = item.Text; comment.ParentId = item.ParentId; comment.PrNumber = item.PrNumber; comment.UserId = "123-456-789"; CommentAppService commentAppService = new CommentAppService(); var result = commentAppService.Add(comment); var resultComment = ConvertToViewModel(result); return(Json(new { isSuccess = true, data = resultComment }, JsonRequestBehavior.AllowGet)); }