var result=from stdnt in students
join lssn in lessons on new {number ==stdnt.state==true ? stdnt.newnumber : s.oldnumber}
equals new {number ==stdnt.state==true ? lssn.newnumber : lssn.oldnumber}
select new {.... };
'lssn'名称'等于'运营商不尊重右侧。表达式中的“等于”运算符考虑改变边。
答案 0 :(得分:0)
尝试简化您的查询:
var reslt = from stdnt in students
join lssn in lessons on (stdnt.state ? stdnt.newnumber : stdnt.oldnumber)
equals (lssn.state ? lssn.newnumber : lssn.oldnumber)
select new { ... };