public async Task <IEnumerable <PhotoViewModel> > GetAllPhotosForAlbum(int albumId) { var photoRepo = new PhotoController(_clientFactory); var allPhotos = await photoRepo.GetAllPhotosForAlbum(albumId); var photoViewModels = allPhotos.Select(p => new PhotoViewModel() { Id = p.Id, Title = p.Title, Url = p.Url, ThumbnailUrl = p.ThumbnailUrl, }); return(photoViewModels); }