public static Models.Artist ToShallowArtistJson(this Data.Models.Artist artistData) { return(new Models.Artist { id = artistData.ArtistId, username = artistData.Username, }); }
public static Models.Artist ToArtistJson(this Data.Models.Artist artistData) { return(new Models.Artist { id = artistData.ArtistId, username = artistData.Username, pieces = artistData.Pieces.Select(ToShallowPieceJson).ToArray(), }); }