1

我有一个要转换为 LINQ 的 SQL 查询。我正在使用 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
4

0 回答 0