title: Join using LINQ between two tables, return records from only one of them
body: <p>Here's my code:</p>
  
  <pre><code>public IEnumerable&lt;IUIUPCItemShort&gt; GetActiveWithDefaultCost()
      {
          var query = from upc in DataManagerFactory.Get().Manage&lt;IUPCItem&gt;().GetAll()
                      join inv in DataManagerFactory.Get().Manage&lt;IInventory&gt;().GetAll() on upc.UPCID equals inv.UPCID
                      where inv.ExitDate == null
                           &amp;&amp; upc.UnitCost == null
                      select upc;
          return
              query.Cast&lt;IUIUPCItemShort&gt;().ToList();
  </code></pre>
  
  <p>Basically, I'm trying to do a Join between two tables, <code>UPC</code> and <code>Inventory</code>, and would like to have a list of only <code>UPC</code> that satisfy the <code>WHERE</code> conditions since I only want to show the user a list of <code>UPC</code>. I obviously am doing something really wrong, because I get this message:</p>
  
  <blockquote>
    <p>Unable to cast object of type 'System.Linq.Expressions.MethodCallExpressionN' to type 'SubSonic.Linq.Structure.ProjectionExpression'.</p>
  </blockquote>
  
  <p>I assume the problem is in my Linq code, especifically in the <code>select upc;</code>
  How can I do what I'm trying to accomplish?</p>
  
  <p>Thanks.</p>