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