async void Save_Clicked(object sender, System.EventArgs e) { GameDataAccess dataAccess = new GameDataAccess(); var ItemRow = (ItemModel)BindingContext; dataAccess.InsertItem(ItemRow); await Navigation.PopAsync(); }
async void Read_Clicked(object sender, System.EventArgs e) { ItemRestClientService ItemService = new ItemRestClientService(); ItemAPIRequestModel reqItem = new ItemAPIRequestModel(); reqItem.randomItemOption = 1; reqItem.superItemOption = 1; List <ItemModel> items = new List <ItemModel>(); items = await ItemService.PostCharForPostClient(reqItem); GameDataAccess dataAccess = new GameDataAccess(); dataAccess.DeleteAllItem(); foreach (ItemModel item in items) { dataAccess.InsertItem(item); } await Navigation.PushAsync(new ItemsListPage()); }