コード例 #1
0
        private void btnInsertclicked2(object sender, EventArgs e)
        {
            var       db = MoneyItemDatabase.getDatabase();
            MoneyItem m  = new MoneyItem()
            {
                ID = 20, Name = "HELLO", Done = false
            };

            db.SaveItemAsync(m);
            DisplayAlert("SQLite", "追加されたよ", "OK");
        }
コード例 #2
0
        private async void btnListClicked(object sender, EventArgs e)
        {
            var db = MoneyItemDatabase.getDatabase();

            List <MoneyItem> itemList;

            //            itemList = await db.GetItemsNotDoneAsync();
            itemList = await db.GetItemsAsync();

            int size = itemList.Count;

            await DisplayAlert("SQLite", size + "件のデータ", "OK");
        }