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'