public ActionResult DeleteConfirmed(int id) { Tabl tabl = db.Tabl.Find(id); db.Tabl.Remove(tabl); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "Id,Number,PlaceNumber")] Tabl tabl) { if (ModelState.IsValid) { db.Entry(tabl).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(tabl)); }
public ActionResult Create([Bind(Include = "Id,Number,PlaceNumber")] Tabl tabl) { if (ModelState.IsValid) { db.Tabl.Add(tabl); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(tabl)); }
// GET: Tabls/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Tabl tabl = db.Tabl.Find(id); if (tabl == null) { return(HttpNotFound()); } return(View(tabl)); }