public ItemResponse GetItems(string country, string value, Enumerations.enumTypeSearch type) { string stringRequest = ""; if (type == Enumerations.enumTypeSearch.Category) { stringRequest = "/sites/" + country + "/search?category=" + value; } else if (type == Enumerations.enumTypeSearch.Item) { stringRequest = "/sites/" + country + "/search?q=" + value; } ItemResponse oResult = null; using (var client = new HttpClient()) { var result = Task.Run(async() => await m.GetAsync(stringRequest, null)).Result; string Response = result.Content.ReadAsStringAsync().Result; oResult = JsonConvert.DeserializeObject <ItemResponse>(Response); } return(oResult); }
public ItemResponse GetItems(string country, string CategoryId, Enumerations.enumTypeSearch type) { return(E_Commerce.Model.DAL.Controller.ECommerceDataController.Instance.GetItems(country, CategoryId, type)); }
public ItemResponse GetItems(string country, string CategoryId, Enumerations.enumTypeSearch type) { return(DataFactory.GetItems(country, CategoryId, type)); }