private static List <NamedAPIResource> GetVersionGroups(EFPokedexes pokedex) { return(pokedex .PokedexVersionGroups .Select(x => x.VersionGroup.ToNamedApiResource()) .ToList()); }
private static List <Name> GetNames(EFPokedexes pokedex) { return(pokedex .PokedexProse .Select(x => new Name(x.Name, x.LocalLanguage.ToNamedApiResource())) .ToList()); }
private static List <Description> GetDescriptions(EFPokedexes pokedex) { return(pokedex .PokedexProse .Select(x => new Description(x.Description, x.LocalLanguage.ToNamedApiResource())) .ToList()); }
private static List <PokemonEntry> GetEntries(EFPokedexes pokedex) { return(pokedex .PokemonDexNumbers .OrderBy(x => x.PokedexNumber) .Select(x => new PokemonEntry(x.PokedexNumber, x.Species.ToNamedApiResource())) .ToList()); }
internal static NamedAPIResource ToNamedApiResource(this EFPokedexes src) => src.ToNamedApiResource <PokedexesController>();
private static NamedAPIResource GetRegion(EFPokedexes pokedex) { return(pokedex .Region? .ToNamedApiResource()); }