public IActionResult Grid(EthnicitySearchModel model) { model = InitializeModel(model); var result = _lookupFacadeApiClient.GetEthnicities(model).Result; return(PartialView(result)); }
public async Task <EthnicitySearchModel> GetEthnicities(EthnicitySearchModel model) { var url = ODataApiUri + "/Ethnicity?" + GetFilterStringForLookup(model); var result = await GetOdataResultFromApi(url); var searchResultCount = 0; if (result.Count != null) { int.TryParse(result.Count.ToString(), out searchResultCount); } model.TotalRows = searchResultCount; model.EthnicitySearchResult.Clear(); model.EthnicitySearchResult.AddRange(result.Items.Select(item => JsonConvert.DeserializeObject <EthnicityDto>(item.ToString()))); return(model); }
public async Task <EthnicitySearchModel> GetEthnicities(EthnicitySearchModel model) { return(await _ethnicityApiClient.GetEthnicities(model)); }
private EthnicitySearchModel InitializeModel(EthnicitySearchModel model) { model = InitializeSearchModel(model, "EthinicityGrid", "Name", "Desc"); return(model); }