public JsonResult GetTreeData() { IBaseBll <TableInfo> tableBll = new BaseBll <TableInfo>(); var treeNodes = tableBll.QueryAll().Select(m => new { id = m.Id, parent = m.ParentId.ToString() == "0" ? "#" : m.ParentId.ToString(), text = m.NameCh, icon = m.TreeIcon }); return(Json(treeNodes, JsonRequestBehavior.AllowGet)); }