title: Entity framework joins
body: <p>I'm using the entity framework 4.0 and I'm having some issues with the syntax of my query. I'm trying to join 2 tables and pass a parameter to find the value at the same time.I would like find all of the products in table 2 by finding the correlating value in table 1.</p>
  
  <p>Can someone help me out with syntax please?</p>
  
  <p>Thanks in advance.</p>
  
  <p>sample data</p>
  
  <p><strong>table 1</strong></p>
  
  <pre><code>ID  productID   categoryID  
  361 571         16  
  362 572         17  
  363 573         16  
  364 574         19  
  365 575         26
  </code></pre>
  
  <p><strong>table 2</strong></p>
  
  <pre><code>productID   productCode
  
  571     sku
  
  572     sku
  
  573     sku
  
  574     sku
  
  575     sku 
  
  
  
  
  var q = from i in context.table1
                              from it in context.table2
                              join &lt;not sure&gt; 
                              where i.categoryID == it.categoryID and &lt; parameter &gt;
                            select e).Skip(value).Take(value));
  
                      foreach (var g in q)
                      {
                          Response.Write(g.productID);
                      }
  </code></pre>