コード例 #1
0
        public async Task <PhotoModel> GetById(Guid offerId, Guid photoId)
        {
            var offer = await _repository.GetByIdWithPhotos(offerId);

            var photo = offer.Photos.FirstOrDefault(p => p.Id == photoId);

            return(_mapper.Map <PhotoModel>(photo));
        }