public ActionResult DeleteConfirmed(int id) { Tezgah tezgah = db.Tezgahs.Find(id); db.Tezgahs.Remove(tezgah); db.SaveChanges(); return(RedirectToAction("Index")); }
// // GET: /Tezgah/Delete/5 public ActionResult Delete(int id = 0) { Tezgah tezgah = db.Tezgahs.Find(id); if (tezgah == null) { return(HttpNotFound()); } return(View(tezgah)); }
public ActionResult Edit(Tezgah tezgah) { if (ModelState.IsValid) { db.Entry(tezgah).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(tezgah)); }
public ActionResult Create(Tezgah tezgah) { if (ModelState.IsValid) { db.Tezgahs.Add(tezgah); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(tezgah)); }