public ActionResult DeleteConfirmed(int id)
        {
            BoughtMovie boughtMovie = db.BoughtMovies.Find(id);

            db.BoughtMovies.Remove(boughtMovie);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
 public ActionResult Edit([Bind(Include = "BoughtMovieID,ReceiptNumber,CostToBuy,Bought,BoughtDate,ListID")] BoughtMovie boughtMovie)
 {
     if (ModelState.IsValid)
     {
         db.Entry(boughtMovie).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.ListID = new SelectList(db.Lists, "ListID", "ListName", boughtMovie.ListID);
     return(View(boughtMovie));
 }
        // GET: BoughtMovies/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            BoughtMovie boughtMovie = db.BoughtMovies.Find(id);

            if (boughtMovie == null)
            {
                return(HttpNotFound());
            }
            return(View(boughtMovie));
        }
        // GET: BoughtMovies/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            BoughtMovie boughtMovie = db.BoughtMovies.Find(id);

            if (boughtMovie == null)
            {
                return(HttpNotFound());
            }
            ViewBag.ListID = new SelectList(db.Lists, "ListID", "ListName", boughtMovie.ListID);
            return(View(boughtMovie));
        }