public ActionResult DeleteConfirmed(int id) { PlacesOfWorship placesOfWorship = db.PlacesOfWorships.Find(id); db.PlacesOfWorships.Remove(placesOfWorship); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "Id,Theme,Sub_Theme,Feature_Name,Co_ordinates")] PlacesOfWorship placesOfWorship) { if (ModelState.IsValid) { db.Entry(placesOfWorship).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(placesOfWorship)); }
public ActionResult Create([Bind(Include = "Id,Theme,Sub_Theme,Feature_Name,Co_ordinates")] PlacesOfWorship placesOfWorship) { if (ModelState.IsValid) { db.PlacesOfWorships.Add(placesOfWorship); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(placesOfWorship)); }
// GET: PlacesOfWorships/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } PlacesOfWorship placesOfWorship = db.PlacesOfWorships.Find(id); if (placesOfWorship == null) { return(HttpNotFound()); } return(View(placesOfWorship)); }