Пример #1
0
        public LibraryPageVm()
        {
            _db = DatabaseHelper.OpenConnection();

            _playlistManager = new PlaylistManager();
        }
        private async Task GeneratePlaylists()
        {
            var dbConnection = DatabaseHelper.OpenConnection();

            var songs = await dbConnection.Table<SongModel>().ToListAsync();

            Random rand = new Random();

            PlaylistManager manager = new PlaylistManager();

            await manager.CreateNewPlaylistAsync("Playlist One", songs.GetRange(rand.Next(10) + 1, rand.Next(20)));



        }