Exemplo n.º 1
0
        public static async Task <AlbumResponse> CreateFromAlbumAsync(IAlbum album)
        {
            var artist = await album.GetArtistAsync();

            var songs = await album.GetSongsAsync();

            return(new AlbumResponse
            {
                Id = album.Id,
                Name = album.Name,
                CoverArt = album.CoverArt,
                Artist = new ArtistDescription(artist),
                Songs = songs.Select(song => new SongDescription(song)),
            });
        }