public ActionResult Delete(int?id) { moviesdb movie = db.moviesdbs.Find(id); if (id != null) { } return(View()); }
public ActionResult Delete([Bind(Include = "Id, Title, Release_Date, Genre, Price, Rating")] moviesdb movie) { if (ModelState.IsValid) { //deleting database record here db.moviesdbs.Remove(movie); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(movie)); }