Left outer join with LINQ

Can someone help me translate this query into LINQ? I can’t find a good way to translate it, thanks!

SELECT C.id, C.id_old, C.cus_id, C.namefirst, C.title, CP.id as 'cus_phone_jct.id', CP.contact_id, CP.phone_id, CP.ext, P.id as 'cus_phone.id', P.phone, P.typ_id, P.status_id, P.donotcontact FROM cus_contact C LEFT OUTER JOIN cus_phone_jct CP ON C.id = CP.contact_id LEFT OUTER JOIN cus_phone P ON CP.phone_id = P.id WHERE C.cus_id = 4 
+4
source share
1 answer

Try

 from c in DataContext.cus_contact join cp in DataContext.cus_phone_jct on c.id equals cp.contact_id into cp2 from cp3 in cp2.DefaultIfEmpty() join p in DataContext.cus_phone on cp3.phone_id equals p.id into p2 from p3 in p2.DefaultIfEmpty() where c.cus_id = 4 select c.id, cp3.id ... 
+6
source

All Articles