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)); }
public ActionResult <IEnumerable <string> > Get() { var itemResult = CategoryBl.GetAll(); return(new JsonResult(itemResult)); }