示例#1
0
        public IEnumerable <Category> Get()
        {
            IQueryable <Category>  result     = _repo.GetAllCategories();
            IEnumerable <Category> categories = result.ToList();

            return(categories);
        }
示例#2
0
        public ActionResult Upload()
        {
            IQueryable <Category>  result     = _repo.GetAllCategories();
            IEnumerable <Category> categories = result.ToList();

            //get all categories and generate the JSon
            return(View());
        }