var query = (from c in context.Role
//join rf in context.RoleFuns
//on c.Id equals rf.RoleId
select new DTORole()
{
RoleName = c.RoleName,
Id = c.Id,
FunList = (from f in context.RoleFuns
where f.RoleId == c.Id
select new DTOFunction() { FunName = f.Function.FunName, Id = f.Id }).ToList<DTOFunction>()
}).ToList();
return query;