【发布时间】:2013-01-11 07:51:44
【问题描述】:
我通过在两个表上应用连接从一个表中获取数据,但是我收到了这个错误:
Error 40 The type of one of the expressions in the join clause is incorrect. Type inference failed in the call to 'Join'. C:\Documents and Settings\Ashir\My Documents\OpenLearningSolutions08-01-2013\OpenLearningSolutions\purchase.aspx.cs 70 21 C:\...\OpenLearningSolutions\
这是我的代码:
OLSContainer ols = new OLSContainer();
var reSet = from l in ols.LEVEL_COURSE
join lp in ols.PACKAGES
on new { l.course_ID, l.levelID } equals new { lp.course_ID, lp.level_ID }
select l;
虽然所有四列都是 int nullabe 类型,但我收到此错误。请帮助我。
【问题讨论】:
标签: asp.net entity-framework join