public static ArtistDTO ToLongDTO(Artist artist) { if (artist == null) { return(null); } return(new ArtistDTO() { Id = artist.Id, Name = artist.Name, UrlPicture = artist.UrlPicture, Albums = artist.Albums.Select(a => AlbumCoreConverter.ToLongDTO(a)).ToList() }); }
public static SongDTO ToLongDTO(Song song) { if (song == null) { return(null); } return(new SongDTO() { Id = song.Id, Name = song.Name, Year = song.Year, Album = AlbumCoreConverter.ToShortDTO(song.Album), Artist = ArtistCoreConverter.ToShortDTO(song.Album.Artist), Url = song.Url }); }