Exemple #1
0
        public IActionResult GetAllNationalParks()
        {
            var nationalParks = _nationalParkRepository.GetAllNationalParks();

            var nationalParksToReturn =
                _mapper.Map <IEnumerable <NationalPark>, IEnumerable <NationalParkDto> >(nationalParks);

            return(Ok(nationalParksToReturn));
        }
        public IActionResult GetAll()
        {
            var parks = _nationalParkRepository.GetAllNationalParks();

            return(Ok(_mapper.Map <IEnumerable <NationalPark>, IEnumerable <NationalParkDto> >(parks)));
        }