【发布时间】:2013-04-04 19:59:57
【问题描述】:
var query = from section in load_sections.Sections
join course in load_sections.Courses
on section.Course_Id equals course.Course_Id
join faculty in load_sections.Faculties
on section.Faculty_Id equals faculty.Faculty_Id
select section;
我的 section.Faculty_Id 中有一些空值,它们不等于 Faculty.Faculty_Id 中的任何行,它只是返回 section.Faculty_Id 不为空的记录...如果 section.Faculty_Id 不为空,那么它必须返回 Table Courses 的其他剩余字段
【问题讨论】:
-
如果只选择
section,为什么要加入faculty?看起来删除联接可以解决您的问题。
标签: c# .net wpf linq entity-framework