title: How to join tables in EF LINQ
body: <p>When I try to join tables</p>
  
  <pre><code>var query =
      from foo in db.Foos
      from bar in db.Bars
      where foo.ID == bar.FooID
      where foo.ID == 45
      select bar;
  
  
  query.toArray()
  </code></pre>
  
  <p>I get such error</p>
  
  <pre><code>Unable to create a constant value of type 'Bar'. Only primitive types ('such as Int32, String, and Guid') are supported in this context.
  </code></pre>