ef linq多表查询(三表)

var ph = (from c in reef.CQICC_CLIENT
join v in reef.CQICC_VISIT_CLIENT on c.CLIENT_T_ID equals v.CLIENT_T_ID
join r in reef.COM_INFO on c.REG_DOC_SN equals r.REG_DOC_SN
where c.CLIENT_T_ID == id
select new {
CLIENT_T_COMNAME = c.CLIENT_T_COMNAME,
CLIENT_LXR = v.CLIENT_LXR,
CLIENT_LXR_PHONE = v.CLIENT_LXR_PHONE,
VISIT_PHONE_END = v.VISIT_PHONE_END,
VISIT_PHONE_REMARK = v.VISIT_PHONE_REMARK,
VISIT_PHONE_START = v.VISIT_PHONE_START,
VISIT_PHONE_TIME = v.VISIT_PHONE_TIME
}).ToList();

posted @ 2017-10-23 13:47  小彭小彭头发蓬蓬  阅读(641)  评论(0编辑  收藏  举报