public static Pokemon GetPokemon(int id) { using (var context = new OmgPokedexEntities()) { return context.AllPokemonSummaries.Where(x => x.PokedexNo == id).AsEnumerable().Select(GetPokemon).SingleOrDefault(); } }
public static IEnumerable<Pokemon> GetAllPokemons() { using (var context = new OmgPokedexEntities()) { return context.AllPokemonSummaries.AsEnumerable().Select(GetPokemon).ToArray(); } }