public ActionResult CreateComment(CommentCreateModel model) { if (ModelState.IsValid) { var comment = model.ConvertToComment(); comment.Id = CommentHelper.CreateComment(comment); return(PartialView("_Comment", new CommentViewModel(comment))); } return(Json(new { error = CommentHelper.BuildErrorMessage(ModelState) })); }