public async Task <IActionResult> GetPhoto(int id) { var photoFromRepo = await _repo.GetPhoto(id); var photo = _mapper.Map <PhotoForReturnDto> (photoFromRepo); return(Ok(photo)); }
public async Task <IActionResult> GetPhoto(int id) { var photoFromRepo = await _repo.GetPhoto(id); //Because we don't want to return everything from our photoFromRepo var photo = _mapper.Map <PhotosForReturnDTO>(photoFromRepo); return(Ok(photo)); }