public ActionResult Borrar(int id = 0) { Videogames videogame = Videogames.Get(id); if (videogame != null) { videogame.Delete(); } return(Redirect("~/")); }
public ActionResult Eliminar(int id = 0) { //Eliminar la entrada si existe. Videogames videogames = Videogames.GetVideogames(id); if (videogames != null) { //Borrar videogames.Delete(); } return(Redirect("~/")); }
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")); }