Пример #1
0
        public async Task LoadPlaylistsFromDatabase()
        {
            var trackColl = await trackCollectionRepository.LoadTrackCollections().ToObservableAsync();

            foreach (var trackCollection in trackColl)
            {
                var observableCollection = await tracklistItemRepository.LoadTracks(trackCollection);

                foreach (TracklistItem tracklistItem in observableCollection)
                {
                    TrackItem item = musicDatabase.LoadTrackFromId(tracklistItem.TrackId);
                    trackCollection.Playlist.Add(item);
                }
            }
            TrackCollections = trackColl;
        }