public JsonResult AddMartini(MartiniClub martini) { try { sc.AddMartini(martini); return Json(new { success = true, msg = "Đăng ký thành công" }, JsonRequestBehavior.AllowGet); } catch { return Json(new { success = false, msg = "Đã có lỗi xảy ra" }, JsonRequestBehavior.AllowGet); } }
public void AddMartini(MartiniClub martini) { db.Insert(martini); }