以下の SQL クエリを取得できる Linq-Entity 状態を記述する必要があります
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 )
以下の構文で立ち往生しています
 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 
                             && statusIds.Any(x => x.Equals(RR.StatusID.Value))
                             select RR.OrderId).ToArray();
            }
これにより、以下のエラーが発生します
エラー 50 結合句のいずれかの式の型が正しくありません。'Join' の呼び出しで型の推定に失敗しました。
テーブルに対して複数条件結合を行うにはどうすればよいですか。