public static List <ArtistJson> From(List <Artist> artists) { List <ArtistJson> results = new List <ArtistJson>(); if (artists == null) { return(results); } foreach (Artist a in artists) { results.Add(ArtistJson.From(a)); } return(results); }
public static AlbumJson From(Album album) { var result = new AlbumJson() { AlbumId = album.AlbumId, GenreId = album.GenreId, ArtistId = album.ArtistId, Title = album.Title, Price = album.Price, AlbumArtUrl = album.AlbumArtUrl, Created = album.Created, OrderCount = album.OrderCount, Artist = ArtistJson.From(album.Artist), Genre = GenreJson.From(album.Genre) }; return(result); }