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