title: Linq join where?
body: <ul>
  <li>entity1 - ID, OwnerCode 
  
  <ul>
  <li>entity2 - OwnerCode, DepartmentCode </li>
  </ul></li>
  </ul>
  
  <p>Also I have some DepartmentCode </p>
  
  <p>Now i want get something like this(sql syntax):</p>
  
  <pre><code>Select e1.ID 
  from entity1 e1 
  join entity2 e2 on e1.OwnerCode = e2.OwnerCode and e2.DepartmentCode=7
  </code></pre>
  
  <p>via Linq</p>
  
  <p>I wrote: </p>
  
  <pre><code>var q = from e1 in entityes1 
          join e2 in entityes2 on e1.OwnerCode equals e2.OwnerCode ... 
  </code></pre>
  
  <p>But how insert DepartmentCode=7 here I don't understand.</p>