weixin_33712987 2014-03-31 21:27 采纳率: 0%
浏览 8

发送评论到仓库

How can I add comment to my CommentRepository? Can I just add this line after c.CommentText?
CommentRepository.Instance.AddComment(comment);

    [HttpPost]
    public ActionResult AddComment(string comment)
    {
        Comment c = new Comment();
        c.CommentText = comment;
        return Json(c, JsonRequestBehavior.AllowGet);
    }
  • 写回答

0条回答 默认 最新

    报告相同问题?