1 var handsonitems = from a in db.DltQuestionHandson 2 join c in db.DltBdChapter 3 on new { a.ChapterCode } equals new { c.ChapterCode } 4 select new 5 { 6 a.PlantCode, 7 c.ChapterCode, 8 c.ChapterKnowledge, 9 a.OrgSkillId, 10 c.SkillCode 11 }; 12 var Jobevalitems = from a in db.DltQuestionJobeval 13 join c in db.DltBdChapter 14 on new { a.ChapterCode } equals new { c.ChapterCode } 15 select new 16 { 17 a.PlantCode, 18 c.ChapterCode, 19 c.ChapterKnowledge, 20 a.OrgSkillId, 21 c.SkillCode 22 }; 23 var items = handsonitems.Union(Jobevalitems);
原文:https://www.cnblogs.com/battlecry/p/11543252.html