我有一个SQL Query,我想将其转换为LINQ。我正在使用C#。我试过LINQPad和Linqer。 Linqer没有做RIGHT OUTER JOIN
。 LINQPad根本不做任何转换。
可以通过嵌套连接完成吗?
SELECT dbo.tblPatientMaster.ptM_Name
FROM dbo.tblClinicalInformation
INNER JOIN dbo.tblPatientDiagnosis
INNER JOIN dbo.tblDiagnosisInformation ON
dbo.tblPatientDiagnosis.ptD_tgIId = dbo.tblDiagnosisInformation.tgI_Id
ON dbo.tblClinicalInformation.tcI_Id = dbo.tblDiagnosisInformation.tgI_tcIId
RIGHT OUTER JOIN dbo.tblPatientInformation ON
dbo.tblPatientDiagnosis.ptD_ptIId = dbo.tblPatientInformation.ptI_Id
LEFT OUTER JOIN dbo.tblDepartmentMaster
INNER JOIN dbo.tblDoctorMaster ON
dbo.tblDepartmentMaster.deptM_Id = dbo.tblDoctorMaster.dcM_deptMId
ON dbo.tblPatientInformation.ptI_dcMId = dbo.tblDoctorMaster.dcM_Id
RIGHT OUTER JOIN dbo.tblPatientMaster ON
dbo.tblPatientInformation.ptI_Id = dbo.tblPatientMaster.ptM_Id