Example #1
0
        public async Task <SightDto> GetSightById(int id)
        {
            var sight = await _sightsRepository.FindByIdAsync(id);

            if (sight == null)
            {
                throw new ObjectNotFoundException($"Sight with id {id} does not exist");
            }
            return(_mapper.Map <SightDto>(sight));
        }