async public Task <ContentResult> Get(string query, string pageNumber = "1", string ingredients = null, bool requireAllWords = false) { var foodSearchResults = await GetFoodResults(query, pageNumber, ingredients, requireAllWords); FoodSearchResult results = new FoodSearchResult(foodSearchResults, ingredients, requireAllWords); return(Content(JObject.FromObject(results).ToString(), "application/json")); }
async public Task <FoodSearchResult> Search([FromUri] string query, string pageNumber = "1", string ingredients = null, bool requireAllWords = false) { var foodSearchResults = await GetFoodResults(query, pageNumber, ingredients, requireAllWords); FoodSearchResult results = new FoodSearchResult(foodSearchResults, ingredients, requireAllWords); return(results); }