public ActionResult DeleteConfirmed(long id) { Movie_Details movie_Details = db.Movie_Details.Find(id); db.Movie_Details.Remove(movie_Details); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "Movie_Id,Id,Movie_Name,Genre,Birth_Date,Movies_In_Stock,Movies_Availablility,Account_Number,Video_File,Is_Subscribed_To_Newletter,Is_Deleted,Create_Time_Stamp,Update_Time_Stamp")] Movie_Details movie_Details) { if (ModelState.IsValid) { db.Entry(movie_Details).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.Id = new SelectList(db.Customer_Details, "Id", "Email", movie_Details.Id); return(View(movie_Details)); }
// GET: Movie_Details/Details/5 public ActionResult Details(long?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Movie_Details movie_Details = db.Movie_Details.Find(id); if (movie_Details == null) { return(HttpNotFound()); } return(View(movie_Details)); }
// GET: Movie_Details/Edit/5 public ActionResult Edit(long?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Movie_Details movie_Details = db.Movie_Details.Find(id); if (movie_Details == null) { return(HttpNotFound()); } ViewBag.Id = new SelectList(db.Customer_Details, "Id", "Email", movie_Details.Id); return(View(movie_Details)); }