Пример #1
0
        /// <summary>
        /// Reads all ArtistEntities from the persistence subsystem and creates a new Artist
        /// representation for each entity
        /// </summary>
        /// <param name="dataAccessFacade">Facade to persistence subsystem</param>
        /// <returns>A list of all Artists stored in the persistence subsystem</returns>
        internal static List <Artist> ReadAll(IDataAccessFacade dataAccessFacade)
        {
            List <Artist>  artists  = new List <Artist>();
            List <IArtist> entities = dataAccessFacade.ReadAllArtists();

            foreach (IArtist entity in entities)
            {
                Artist artist = new Artist(entity, dataAccessFacade);
                artists.Add(artist);
            }

            return(artists);
        }