var recordhoursQuery = from w in crnnsupContext.WorkHoursHistories
join p in crnnsupContext.ProvStates on w.Province equals p.ProvinceStateID
join r in crnnsupContext.Renewals on new {w.WorkYear+1,w.RegNumber} equals new{r.RenewalYear, r.RegNumber}
where r.RegNumber == _username
select new CRecordHours
{
WorkHoursHistory = w,
Renewal = r
};
+ 1 equals bを実装する方法は?あなたはそのエラーを受信しているlinq to SQL複数の列といくつかの条件で結合する方法
from w in crnnsupContext.WorkHoursHistories
join p in crnnsupContext.ProvStates on w.Province equals p.ProvinceStateID
from r in crnnsupContext.Renewals
.Where(a=>a.RegNumber==w.RegNumber && (w.WorkYear+1)==r.RenewalYear)
where r.RegNumber == _username
select new CRecordHours
{
WorkHoursHistory = w,
Renewal = r
};