コード例 #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            CopiaPelicula copiaPelicula = db.CopiaPelicula.Find(id);

            db.CopiaPelicula.Remove(copiaPelicula);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
コード例 #2
0
 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));
 }
コード例 #3
0
        // 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));
        }