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