[HttpGet("{id}", Name = "GetPhoto")] //11-5 public async Task <IActionResult> GetPhoto(int id) { var photoFromRepository = await _repo.GetPhotoForProduct(id); var photo = _mapper.Map <PhotoForReturnDto>(photoFromRepository); return(Ok(photo)); }
[HttpGet("{id}", Name = "GetPhoto")] //11-5 public async Task <IActionResult> GetPhoto(int id) { var photoFromRepository = await _repo.GetPhotoForProduct(id); var photo = _mapper.Map <PhotoForReturnDto>(photoFromRepository); return(Ok(photo)); }