public ActionResult DeleteConfirmed(int id)
        {
            ShowTimeAndDate showTimeAndDate = db.ShowTimeAndDate.Find(id);

            db.ShowTimeAndDate.Remove(showTimeAndDate);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
 public ActionResult Edit([Bind(Include = "Id,ShowDate,StartTime,Duration")] ShowTimeAndDate showTimeAndDate)
 {
     if (ModelState.IsValid)
     {
         db.Entry(showTimeAndDate).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(showTimeAndDate));
 }
        public ActionResult Create([Bind(Include = "Id,ShowDate,StartTime,Duration")] ShowTimeAndDate showTimeAndDate)
        {
            if (ModelState.IsValid)
            {
                db.ShowTimeAndDate.Add(showTimeAndDate);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(showTimeAndDate));
        }
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            ShowTimeAndDate showTimeAndDate = db.ShowTimeAndDate.Find(id);

            if (showTimeAndDate == null)
            {
                return(HttpNotFound());
            }
            return(View(showTimeAndDate));
        }