title: LINQ to SQL error on .Join()
body: <p>I'm trying to query a database and join two tables. I've never used Join() this way and I'm getting an error on the second Join():</p>
  
  <pre><code>var adjustments = data.Inventory_ARCHIVEs
      .Where(i =&gt; i.Location == comboBox3.Text &amp;&amp; 
          upcCodes.Contains(i.UPCCode) &amp;&amp; 
          (i.AVtime.Value.Date &gt;= dateTimePicker1.Value.Date &amp;&amp; 
              i.AVtime.Value.Date &lt;= dateTimePicker1.Value.AddDays(1).Date) &amp;&amp; 
          (i.BVtime.Value.Date &gt;= dateTimePicker1.Value.Date &amp;&amp; 
              i.BVtime.Value.Date &lt;= dateTimePicker1.Value.AddDays(1).Date))
      .GroupBy(i =&gt; new { i.UPCCode })
      .Select(i =&gt; new
      {
          ID = i.Max(x =&gt; x.ID),
          i.Key.UPCCode
      })
      .Join(data.Inventory_ARCHIVEs, a =&gt; a.ID, 
          b =&gt; b.ID, (a, b) =&gt; new { a, b })
      .Join(data.BQItems, x =&gt; new { x.a.UPCCode, x.b.Location }, 
          y =&gt; new { y.UPC_Code, y.Location }, (x, y) =&gt; new
      {
          ID = x.a.ID,
          UPCCode = x.a.UPCCode,
          Date = x.b.BVtime.Value.Date,
          Description = y.Description,
          BVamount = x.b.BVamount,
          AVamount = x.b.AVamount,
          Difference = x.b.AVamount - x.b.BVamount,
          AverageCost = x.b.AverageCost,
          ExtCost = (x.b.AVamount - x.b.BVamount) * x.b.AverageCost
      });
  </code></pre>
  
  <p><code>x.a.UPCCode</code> ,<code>x.b.Location</code>, <code>y.UPC_Code</code>, and<code>y.Location</code> are strings.  </p>
  
  <p>This is the error:</p>
  
  <blockquote>
    <p>The type arguments for method 'System.Linq.Enumerable.Join&lt;TOuter,TInner,TKey,TResult>   (System.Collections.Generic.IEnumerable&lt;TOuter>, System.Collections.Generic.IEnumerable&lt;TInner>, System.Func&lt;TOuter,TKey>, System.Func&lt;TInner,TKey>, System.Func&lt;TOuter,TInner,TResult>)' cannot be inferred from the usage. Try specifying the type arguments explicitly.</p>
  </blockquote>
  
  <p>If I DO NOT include the join by "Location" column and just use "UPCCode", it works, but when I add the second join by column, I get the error</p>