Beispiel #1
0
        //BookList.ItemsSource = Books.Select((item) => new ItemWrapper()
        async public void GetBooksFromDatabase()
        {
            //b[1].Title = "TESTETSTETSTE";
            for (int i = 0; i < b.Count; i++)
            {
                await database.SaveBookAsync(b[i]);
            }
            List <Book> test = new List <Book>();

            try
            {
                var bookList = await database.GetBooksAsync();

                bookList[2].Title = "TESTTITLE";
                b = bookList;
            }
            catch (Exception e)
            {
                for (int i = 0; i < b.Count; i++)
                {
                    await database.SaveBookAsync(b[i]);
                }
                Console.Write("2eXCEPTION!!!!" + e);
            }

            test = await database.GetBooksAsync();

            //DisplayAlert("TEST RESULT: ", test[2].Title, " state: " + b[2].Availiable);
        }