日期:2014-05-20 浏览次数:20754 次
var query=from a in tb_sys_menu
where a.ID_FullPath.StartWith("aa") && a.menustatus == 1
join b in tb_sys_menu.Where(x => x.menustatus == 1 && !x.GID.HasValue ).Select(x=>new{x.GID,x.parent_gid})
on a.GID equals b.PARENT_GID into lg
from b in lg.DefaultIfEmpty()
select new {a.name,a.name_fullpath,a.GID,MenuCode=a.permissioncode,a.parent_gid,a.ordernum };