protected async void OnGetList() { try { HttpService service = new HttpService(); JsonConvertService convert = new JsonConvertService(); var content = await service.HttpGetRequest(Url); var tr = convert.ConvertToModel <List <Product> >(content); ObservableCollection <Product> trends = new ObservableCollection <Product>(tr); MyListView.ItemsSource = trends; } catch (Exception ey) { Debug.WriteLine("" + ey); } }
protected async void OnGetList() { try { HttpService service = new HttpService(); JsonConvertService convert = new JsonConvertService(); var content = await service.HttpGetRequest("http://192.168.8.100:45455/api/Stores"); var tr = convert.ConvertToModel <List <Store> >(content); ObservableCollection <Store> trends = new ObservableCollection <Store>(tr); MyListView.ItemsSource = trends; } catch (Exception ey) { Debug.WriteLine("" + ey); } }