public ActionResult <PokemonTypeDTO> Get(string name) { var data = _repository.Get(name); if (data == null) { return(NotFound()); } return(Ok(DTOHelper.GetPokemonTypeDTO(data))); }
public ActionResult <IEnumerable <PokemonTypeDTO> > GetAll() { var data = _repository.Get(); return(Ok(data.Select(x => DTOHelper.GetPokemonTypeDTO(x)))); }