public ActionResult DeleteConfirmed(int id) { Eparchy eparchy = db.Eparchies.Find(id); db.Eparchies.Remove(eparchy); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit(Eparchy eparchy) { if (ModelState.IsValid) { db.Entry(eparchy).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(eparchy)); }
// // GET: /Eparchy/Delete/5 public ActionResult Delete(int id = 0) { ViewBag.ProvinceList = db.Provinces.ToList(); Eparchy eparchy = db.Eparchies.Find(id); if (eparchy == null) { return(HttpNotFound()); } return(View(eparchy)); }
public ActionResult Create(Eparchy eparchy) { if (ModelState.IsValid) { db.Eparchies.Add(eparchy); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(eparchy)); }