2
如何使用C#將這個SQL寫入Linq to SQL。我無法將狀態表加入ConsumerApplications和RepairOrderEstimates以正常工作。謝謝。Linq to SQL加入兩個不同表的兩次相同表
select ca.ConsumerAppID,
ca.LastName,
statConsumerApp.StatusName,
statRepairOrderEstimates.StatusName
from ConsumerApplications ca
join RepairOrderEstimates
on ca.RepairOrderEstimateID = RepairOrderEstimates.RepairOrderEstimateID
join Statuses statConsumerApp
on ca.StatusID = statConsumerApp.StatusID
join Statuses statRepairOrderEstimates
on RepairOrderEstimates.StatusID = statRepairOrderEstimates.StatusID