title: How to Join two columns from table A with two columns from table B - Linq join MVC
body: <p>How can i Join two columns from <code>dbo.Sales Invoice Line</code> with two columns from <code>dbo.Value Entry</code> in linq SQL! Can anyone please help me :) thanks in advance :)</p>
  
  <p>This is SQL version :</p>
  
  <pre><code> SELECT  *
   FROM dbo.[Item Ledger Entry] 
   INNER JOIN 
   dbo.[Value Entry] ON dbo.[Item Ledger Entry].[Entry No_] = dbo.[Value Entry].[Item Ledger Entry No_] 
  
    //Start here
    INNER JOIN
    dbo.[Sales Invoice Line] ON dbo.[Value Entry].[Document No_] = dbo.[Sales Invoice Line].[Document No_] 
    AND 
    dbo.[Value Entry].[Document Line No_] = dbo.[Sales Invoice Line].[Line No_]
  </code></pre>
  
  <p>And this is linq version i end up with , but im not sure i did it in the right way!:</p>
  
  <pre><code>from cbr in db.Contact_Business_Relation
                  join c in db.Contact on cbr.Contact_No_ equals c.Company_No_
                  join sa in db.Sales_Invoice_Header on cbr.No_ equals sa.Sell_to_Customer_No_
                  join sih in db.Sales_Invoice_Line on sa.No_ equals sih.Document_No_
  
                  //Start here
                  join ve in db.Value_Entry on sih.Document_No_ equals ve.Document_No_ 
                  join vetwo in db.Value_Entry on sih.Line_No_ equals vetwo.Document_Line_No_
                  join item in db.Item_Ledger_Entry on ve.Item_Ledger_Entry_No_ equals item.Entry_No_
  </code></pre>