我正在尝试将此查询转换为LINQ查询:
select proj.CustomerName, proj.projectid, ProjectNumber, oe.FullName, oe.Rate, oe.jobid, opj.BillRate, hours.Hours, hours.WeekStart
from RMT_TaskEmployeeHours hours
join OracleEmployees oe
on hours.EmployeeNumber = oe.EmployeeNumber
join OracleProjectTasks tasks
on hours.TaskId = tasks.TaskID
join OracleProjects proj
on tasks.ProjectID = proj.ProjectID
left join OracleProjectJobs opj
on opj.ProjectID = proj.ProjectID
and oe.jobid = opj.JobID
where oe.Office like '%san francisco%'
and opj.EndDate is null
and WeekStart > '2015-1-22' and WeekStart < '2015-2-19'
写完后我卡住了:
var test = db.RMT_TaskEmployeeHours.
Join(
db.OracleEmployees,
hours => hours.EmployeeNumber,
oe => oe.EmployeeNumber,
(hours, oe) => new {hours, oe}).
Join(
db.OracleProjectTasks,
oh => oh.oe.
).