Ejemplo n.º 1
0
        public static async Task <ArtistResponse> CreateFromArtistAsync(IArtist artist)
        {
            var albums = await artist.GetAlbumsAsync();

            return(new ArtistResponse
            {
                Id = artist.Id,
                Name = artist.Name,
                Picture = artist.Picture,
                Albums = albums.Select(album => new AlbumDescription(album))
            });
        }