public ActionResult DeleteConfirmed(int id) { BPartMenu bpartmenu = db.BPartMenus.Find(id); db.BPartMenus.Remove(bpartmenu); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit(BPartMenu bpartmenu) { if (ModelState.IsValid) { db.Entry(bpartmenu).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(bpartmenu)); }
// // GET: /BPartMenu/Edit/5 public ActionResult Edit(int id = 0) { BPartMenu bpartmenu = db.BPartMenus.Find(id); if (bpartmenu == null) { return(HttpNotFound()); } return(View(bpartmenu)); }
public ActionResult Create(BPartMenu bpartmenu) { if (ModelState.IsValid) { db.BPartMenus.Add(bpartmenu); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(bpartmenu)); }