public static Videogames Get(int id)
        {
            Videogames videogame = new Videogames();

            try
            {
                VideogamesContext context = new VideogamesContext();
                videogame = context.Videogames.Where(x => x.id == id).SingleOrDefault();
            }
            catch (Exception)
            {
                throw;
            }
            return(videogame);
        }
Exemple #2
0
        public static Videogames GetVideoGame(int id)
        {
            Videogames videogames = null;

            try
            {
                VideogamesContext context = new VideogamesContext();

                videogames = context.Videogames.Where(x => x.id == id).SingleOrDefault();//devolvemos el videojuego que tenga la id dada
            }
            catch (Exception e)
            {
                throw;
            }
            return(videogames);
        }