title: Linq to Entity Join table with multiple OR conditions
body: <p>I need to write a Linq-Entity state that can get the below SQL query</p>
  
  <pre><code>SELECT  RR.OrderId
  FROM    dbo.TableOne RR
          JOIN dbo.TableTwo  M ON RR.OrderedProductId = M.ProductID OR RR.SoldProductId= M.ProductID
  WHERE   RR.StatusID IN ( 1, 4, 5, 6, 7 )
  </code></pre>
  
  <p>I am stuck with the below syntax</p>
  
  <pre><code> int[] statusIds = new int[] { 1, 4, 5, 6, 7 };
              using (Entities context = new Entities())
              {
                  var query = (from RR in context.TableOne
                               join M in context.TableTwo on new { RR.OrderedProductId, RR.SoldProductId} equals new { M.ProductID }
                               where RR.CustomerID == CustomerID 
                               &amp;&amp; statusIds.Any(x =&gt; x.Equals(RR.StatusID.Value))
                               select RR.OrderId).ToArray();
              }
  </code></pre>
  
  <p>this gives me below error</p>
  
  <p><strong>Error 50  The type of one of the expressions in the join clause is incorrect.  Type inference failed in the call to 'Join'.</strong></p>
  
  <p>How can I do a Multiple condition join for a table.</p>