private async void SearchBar_OnSearchButtonPressed(object sender, EventArgs e) { if (String.IsNullOrWhiteSpace(_searchString)) { return; } var asd = new StringCarrier() { SearchString = _searchString }; var link = Links.AlmsLink + "search"; _initialAlms = await HttpService.Post <ObservableCollection <AlmsgivingsEntity>, StringCarrier>(asd, link); Alms = _initialAlms; // // var json = JsonConvert.SerializeObject(asd); // var httpContent = new StringContent(json, Encoding.UTF8, "application/json"); // var httpResponse = await _client.PostAsync(link, httpContent); // Alms = new ObservableCollection<AlmsgivingsEntity>(); // Alms = JsonConvert.DeserializeObject<ObservableCollection<AlmsgivingsEntity>>(httpResponse.Content // .ReadAsStringAsync() // .Result); Update(); }
public List <AlmsgivingsEntity> SearchAlmsgivings(StringCarrier carrier) { return(_almsgivingService.SearchAlms(carrier.SearchString)); }