public ActionResult DeleteConfirmed(DateTime id) { GapsTable gapsTable = db.GapsTables.Find(id); db.GapsTables.Remove(gapsTable); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "GapStart,GapEnd")] GapsTable gapsTable) { if (ModelState.IsValid) { db.Entry(gapsTable).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(gapsTable)); }
public ActionResult Create([Bind(Include = "GapStart,GapEnd")] GapsTable gapsTable) { if (ModelState.IsValid) { db.GapsTables.Add(gapsTable); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(gapsTable)); }
// GET: GapsTables/Delete/5 public ActionResult Delete(DateTime id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } GapsTable gapsTable = db.GapsTables.Find(id); if (gapsTable == null) { return(HttpNotFound()); } return(View(gapsTable)); }