你好,这是我的linq查询,
var RoutineRemarks = (from i in _context.TableA.Include(a => a.pm_routine_report_type)
from j in _context.TableB.Include(a => a.PM_Evt_Cat).Include(b => b.department).Include(c => c.employees).Include(d => d.provncs)
orderby i.seen_by_executive_on descending
orderby j.English_seen_by_executive_on descending
// Here i face the problem, i want to select i+j
select i+j).ToList();
最后,它只允许我选择i或j,但是我想同时选择两者,我该怎么做?
答案 0 :(得分:0)
以这种方式尝试
select new {I=i, J=j}).ToList();
我也同意@GertArnold。您的主要查询很可能需要联接,但是在不知道ERD的情况下很难说出您需要做什么