Ejemplo n.º 1
0
        public IHttpActionResult Get()
        {
            var            itemResult = CategoryBl.GetAll(x => x.tblSubCategories);
            List <dynamic> dlist      = new List <dynamic>();

            foreach (var item in itemResult)
            {
                dynamic d = new ExpandoObject();
                d.Id          = item.Id;
                d.Name        = item.Name;
                d.Description = item.Description;
                dlist.Add(d);
            }
            return(Json(dlist));
        }
Ejemplo n.º 2
0
        public ActionResult <IEnumerable <string> > Get()
        {
            var itemResult = CategoryBl.GetAll();

            return(new JsonResult(itemResult));
        }