Exemple #1
0
        public async Task <PersonEntity?> Get(string key, ODataQueryOptions <PersonEntity> query, [FromServices] IStarWarsSource starWars)
        {
            var result = await starWars.GetPersonSingleAsync(key);

            return(PersonEntity.Map(result));
        }
Exemple #2
0
        public async Task <IEnumerable <PersonEntity> > Get([FromServices] IStarWarsSource starWars)
        {
            var query = await starWars.GetPersonsAsync();

            return(PersonEntity.Map(query));
        }