public ActionResult DeleteConfirmed(int id) { CopiaPelicula copiaPelicula = db.CopiaPelicula.Find(id); db.CopiaPelicula.Remove(copiaPelicula); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "IdCopiaPelicula,Medio,FechaCreacion,NombreOriginal,PublicadaEn,Genero,PerdidaDanada,FechaPerdidaDanada")] CopiaPelicula copiaPelicula) { if (ModelState.IsValid) { db.Entry(copiaPelicula).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(copiaPelicula)); }
// GET: CopiaPeliculas/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } CopiaPelicula copiaPelicula = db.CopiaPelicula.Find(id); if (copiaPelicula == null) { return(HttpNotFound()); } return(View(copiaPelicula)); }