Пример #1
0
 public bool CommentSave(commentTB c)
 {
     try
     {
         c.commentDate = DateTime.Now;
         Entities.commentTB.Add(c);
         Entities.SaveChanges();
         return true;
     }
     catch (Exception)
     {
         return true;
     }
 }
Пример #2
0
        public JsonResult CommentSave(commentTB c)
        {
            var app = new CommentApp();

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