public IEnumerable <Category> Get() { IQueryable <Category> result = _repo.GetAllCategories(); IEnumerable <Category> categories = result.ToList(); return(categories); }
public ActionResult Upload() { IQueryable <Category> result = _repo.GetAllCategories(); IEnumerable <Category> categories = result.ToList(); //get all categories and generate the JSon return(View()); }