Func递归Easyui Tree
Func<int, List<EasyuiTree>> fun = null;
fun = i =>
{
return result.Where(c => c.ParentId == i).Select(c => new EasyuiTree
{
id = c.CategoryID,
text = c.CategoryName,
state = EasyuiEnum.open.ToString(),
attributes = null,
@checked = false,
children = result.Any(a => a.ParentId == c.CategoryID) ? fun(c.CategoryID) : null
}).ToList();
};