public static bool CreatePV(PackageVip pv) { var en = new ProjectNCTEntities(); en.PackageVips.Add(pv); return(en.SaveChanges() > 0 ? true : false); }
// POST api/<controller> public IHttpActionResult Post(PackageVipView s) { var item = new PackageVip { ID = s.PVipID, PVipName = s.PVipName, PVipMonths = s.PVipMonths, PVipPrice = s.PVipPrice }; var res = Repositories.CreatePV(item); if (res == true) { return(Ok()); } return(InternalServerError()); }
public static bool CreatePV(PackageVip pv) { return(PackageVipDAO.CreatePV(pv)); }
public static bool CreatePV(PackageVip pv) { return(PaymentBUS.CreatePV(pv)); }
//update public void Update(PackageVip packageVip) { db.Entry(packageVip).State = EntityState.Modified; db.SaveChanges(); }
public PackageVip CreatePackageVip(PackageVip packageVip) { db.PackageVips.Add(packageVip); db.SaveChanges(); return(packageVip); }