Example #1
0
        public IActionResult GetAllTrails()
        {
            var trails = _trailRepository.GetAllTrails();

            var trailDtos = _mapper.Map <IEnumerable <Trail>, IEnumerable <TrailDto> >(trails);

            return(Ok(trailDtos));
        }
Example #2
0
        public IActionResult GetTrails()
        {
            var objList = _repo.GetAllTrails();

            var objDto = _mapper.Map <ICollection <Trail>, List <TrailDTO> >(objList);

            return(Ok(objDto));
        }