Entity FrameWork Linq left join with sub query RRS feed

  • Question

  • I need to translate this SQL statement to a Linq-Entity query:

    SELECT DirectDebits.*

    FROM DirectDebits LEFT JOIN (SELECT paymentId, paymentMethodDetails_Id FROM Payments WHERE paymentMethod_Id=1) p

    ON DirectDebits.directDebitId = p.paymentMethodDetails_Id 

    WHERE p.paymentId is NULL AND DirectDebits.function_Id = 3 AND file_Id = [parameter]
    Thanks in advance

    • Edited by RCProg Thursday, April 4, 2013 11:23 AM
    Wednesday, April 3, 2013 12:48 PM


All replies