Beispiel #1
0
        public async Task <IEnumerable <Album> > GetAlbumsWithPhotos()
        {
            // Get Albums
            var consumeAlbums = await _consumeService.GetAlbums();

            // Get Photos
            var consumePhotos = await _consumeService.GetPhotos();

            var albums = _mapper.Map <ICollection <Album> >(consumeAlbums);
            var photos = _mapper.Map <ICollection <Photo> >(consumePhotos);

            return(MergeAlbumsAndPhotos(albums, photos));
        }
 public async Task <IEnumerable <Album> > GetAllAlbumsAsync()
 {
     return(await apiClient.GetAlbums());
 }