public ActionResult Borrar(int id = 0)
        {
            Videogames videogame = Videogames.Get(id);

            if (videogame != null)
            {
                videogame.Delete();
            }
            return(Redirect("~/"));
        }
Esempio n. 2
0
        public ActionResult Eliminar(int id = 0)
        {
            //Eliminar la entrada si existe.
            Videogames videogames = Videogames.GetVideogames(id);

            if (videogames != null)
            {
                //Borrar
                videogames.Delete();
            }
            return(Redirect("~/"));
        }
Esempio n. 3
0
        public ActionResult Borrar(int id = 0)
        {
            //Eleminar datos de la db
            Videogames game = Videogames.GetGame(id);

            if (game != null)
            {
                //borrar
                game.Delete();
            }

            return(Redirect("~/Home"));
        }