public ActionResult DeleteConfirmed(int id) { theme_park theme_park = db.theme_park.Find(id); db.theme_park.Remove(theme_park); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "theme_park_id,theme_park_name,park_open,park_close,park_country,park_state_or_province,park_city,park_street_address")] theme_park theme_park) { if (ModelState.IsValid) { db.Entry(theme_park).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(theme_park)); }
// GET: ThemeParkAdmin/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } theme_park theme_park = db.theme_park.Find(id); if (theme_park == null) { return(HttpNotFound()); } return(View(theme_park)); }