コード例 #1
0
ファイル: commnet.cs プロジェクト: towesco/mvc_comment
 public bool CommentSave(commentTB c)
 {
     try
     {
         c.commentDate = DateTime.Now;
         Entities.commentTB.Add(c);
         Entities.SaveChanges();
         return true;
     }
     catch (Exception)
     {
         return true;
     }
 }
コード例 #2
0
ファイル: HomeController.cs プロジェクト: mustva/mvc_comment
        public JsonResult CommentSave(commentTB c)
        {
            var app = new CommentApp();

            return(Json(app.CommentSave(c), JsonRequestBehavior.AllowGet));
        }