public async Task <IActionResult> GetPhoto(int id) { var photoFromRepo = await photosRepository.GetPhoto(id); var photo = mapper.Map <PhotoForReturnDto>(photoFromRepo); return(Ok(photo)); }
public byte[] GetPhotoData(int photoId) { var photo = _photosRepository.GetPhoto(photoId); if (photo == null) { return(null); } var photoData = File.ReadAllBytes(GetImageDirectoryPath(photo.PhotoName)); return(photoData); }
public async Task <Photo> GetPhoto(int id) { return(await _photosRepo.GetPhoto(id)); }
public Photo GetPhoto(int photoId) { return(_repository.GetPhoto(photoId)); }
public async Task <PhotoForReturnModel> GetPhoto(int id) { return(await _repo.GetPhoto(id)); }