Example #1
0
        public async Task <Album> GetAlbumPorIdCancion(string idCancion)
        {
            CancionService cancionService = new CancionService();
            Cancion        cancion        = await cancionService.GetCancionPorId(idCancion);

            Album album = null;

            if (cancion != null)
            {
                album = await GetAlbumPorId(cancion.IdAlbum);
            }
            return(album);
        }
Example #2
0
        public async Task <List <Artista> > GetArtistasPorIdCancion(string idCancion)
        {
            CancionService cancionService = new CancionService();
            Cancion        cancion        = await cancionService.GetCancionPorId(idCancion);

            List <Artista> artistas = null;

            if (cancion != null)
            {
                artistas = new List <Artista>();
                foreach (string idArtista in cancion.IdsArtistas)
                {
                    Artista artista = await GetArtistaPorId(idArtista);

                    if (artista != null)
                    {
                        artistas.Add(artista);
                    }
                }
            }
            return(artistas);
        }