public async Task <List <ItemModel> > PostCharForPostClient(ItemAPIRequestModel req) { RestClient <ItemModel> restClient = new RestClient <ItemModel>(); var ItemList = await restClient.PostAsync(req); return(ItemList); }
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()); }