0
我是Linq连接的新手。将sql查询转换为具有复杂左连接的linq
我有一个SQL查询如下。请帮我把它转换成linq。
select c.mem_id,
c.po_start,
c.po_end,
isnull(pp.new_policy_code,c.policy_no)
from claims_data c
left join tob_policy tp on (c.subgroup_id =tp.subgroup_id and c.category_id = tp.category_id
and c.service_from_date Between tp.Start_Date And isnull (tp.End_Date,
cast(GETDATE() as date)))
Left Join Tob_Policy_Period Pp On (Pp.Policy_Id = tp.Policy_Id And
c.service_from_date Between Pp.Start_Date And Pp.End_Date)
where c.cid = 13
and c.g_id = 19013
and c.mem_id = '123'
and c.code ='555'