public ActionResult GetNutritionValues(FoodName foodName) { System.Diagnostics.Debug.WriteLine(foodName.Name); var res = NutritionProvider.GetNutritionValues(foodName.Name); return(Json(res, JsonRequestBehavior.AllowGet)); }
public ActionResult GetSearchData(FoodName foodName) { var parsed = ParseNameForSearch(foodName.Name.ToLower()); var res = GlobalProductCache.ProductCache .Where(p => p.Name.ToLower().Contains(parsed)); return(Json(res, JsonRequestBehavior.AllowGet)); }