public async Task <IActionResult> Get([FromRoute] string name) { _logger.LogDebug("Getting {PokemonName}", name); var monster = await _pokemonService.GetAsync(name); if (monster == null) { return(NotFound()); } return(Ok(monster)); }
public async Task <ActionResult <Pokemon> > Get(int id) { return(await _pokemonService.GetAsync(id)); }