public ActionResult DeleteConfirmed(int id) { TBL_PELICULA tBL_PELICULA = db.TBL_PELICULA.Find(id); db.TBL_PELICULA.Remove(tBL_PELICULA); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "Codigo,Titulo,Director,AutorPrincipal,No_Actores,Duracion,Estreno")] TBL_PELICULA tBL_PELICULA) { if (ModelState.IsValid) { db.Entry(tBL_PELICULA).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(tBL_PELICULA)); }
public ActionResult Create([Bind(Include = "Codigo,Titulo,Director,AutorPrincipal,No_Actores,Duracion,Estreno")] TBL_PELICULA tBL_PELICULA) { if (ModelState.IsValid) { db.TBL_PELICULA.Add(tBL_PELICULA); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(tBL_PELICULA)); }
// GET: TBL_PELICULA/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } TBL_PELICULA tBL_PELICULA = db.TBL_PELICULA.Find(id); if (tBL_PELICULA == null) { return(HttpNotFound()); } return(View(tBL_PELICULA)); }