public bool CommentSave(commentTB c) { try { c.commentDate = DateTime.Now; Entities.commentTB.Add(c); Entities.SaveChanges(); return true; } catch (Exception) { return true; } }
public JsonResult CommentSave(commentTB c) { var app = new CommentApp(); return(Json(app.CommentSave(c), JsonRequestBehavior.AllowGet)); }