/// <summary> /// Retrieve all artists /// </summary> /// <returns>List of <see cref="Artist"/></returns> public List<Dragon.Core.Domain.Artist> GetAll() { LogManager.GetLogger("").Info("Retrieve all artists"); var artistList = new List<Dragon.Core.Domain.Artist>(); var result = this.Provider.GetArtists(); foreach (var a in result) { var artist = new Dragon.Core.Domain.Artist(); artist.Id = a.ArtistId; artist.Name = a.Name; artistList.Add(artist); } return artistList; }
/// <summary> /// Retrieves an artist for the given identifier /// </summary> /// <param name="id">Artist Identifier</param> /// <returns>An <see cref="Artist"/></returns> public Dragon.Core.Domain.Artist GetById(int id) { LogManager.GetLogger("").Info("Retrieves an artist for the given identifier"); var result = this.Provider.GetArtist(id); var artist = new Dragon.Core.Domain.Artist(); artist.Id = result.ArtistId; artist.Name = result.Name; return artist; }