我想将此SQL查询转换为Linq查询
select
prsnRolIDTitle, prprdID
from
Tbl_RoleDetail
left outer join
Tbl_PersonRolPersonRolDetail on Tbl_RoleDetail.prsnRolDID = Tbl_PersonRolPersonRolDetail.prsnRolDID
and Tbl_PersonRolPersonRolDetail.prsnRolID = 6
感谢您的帮助!
答案 0 :(得分:0)
也许是这样的:
from rd in Tbl_RoleDetail
from Tbl_PersonRolPersonRolDetail.Where(t => t.prsnRolID = 6 && t.prsnRolDID == rd.prsnRolDID).DefaultIfEmpty()
select new {rd.prsnRolIDTitle, prd.prprdID}