public ActionResult DeleteConfirmed(int id) { RollerBaseLocation rollerBaseLocation = db.RollerBaseLocations.Find(id); db.RollerBaseLocations.Remove(rollerBaseLocation); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "RollerBaseLocationID,Location")] RollerBaseLocation rollerBaseLocation) { if (ModelState.IsValid) { db.Entry(rollerBaseLocation).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(rollerBaseLocation)); }
public ActionResult Create([Bind(Include = "RollerBaseLocationID,Location")] RollerBaseLocation rollerBaseLocation) { if (ModelState.IsValid) { db.RollerBaseLocations.Add(rollerBaseLocation); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(rollerBaseLocation)); }
// GET: RollerBaseLocations/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } RollerBaseLocation rollerBaseLocation = db.RollerBaseLocations.Find(id); if (rollerBaseLocation == null) { return(HttpNotFound()); } return(View(rollerBaseLocation)); }