public List <Album> GetAllAlbums() { List <Album> albums = new List <Album>(); CoreToDataMapperService mapperService = new CoreToDataMapperService(); foreach (IAlbum albumData in _albumRepository.GetAllAlbums()) { albums.Add(mapperService.MapAlbumDataToCore(albumData)); } return(albums); }
public Album GetAlbum(int id) { CoreToDataMapperService mapperService = new CoreToDataMapperService(); return(mapperService.MapAlbumDataToCore(_albumRepository.GetAlbum(id))); }