Esempio n. 1
0
        public IActionResult GetTrailInNationalParkiId(int NationalParkiId)
        {
            var da = trailRepository.GetTrailsInNationPark(NationalParkiId);


            if (da == null)
            {
                return(BadRequest());
            }


            var modelList = new List <TrailDTO>();

            foreach (var item in da)
            {
                modelList.Add(mapper.Map <TrailDTO>(item));
            }


            return(Ok(modelList));
        }