1 回答

TA贡献1862条经验 获得超6个赞
您不想订购主列表,我想您正在寻找一种在外部列表中订购内部列表的方法。所以下面的代码会为你做:
var CGTABLE = (
from cg in DbContext.CGTABLE
join tcg in DbContext.TCGTABLE on new { cg.CGroupId } equals new { tcg.CGroupId }
where tcg.TId == TId
select new {
CGroupId = cg.CGroupId,
CGroupCode = cg.CGroupCode,
Description = cg.Description,
C = cg.C.OrderBy(x => x.CCode),
DisplayOrder = cg.DisplayOrder
}).ToList();
CGTABLE = CGTABLE.OrderBy(g => g.DisplayOrder).ToList();
- 1 回答
- 0 关注
- 202 浏览
添加回答
举报