title: Is there some sort of syntax error with this LINQ JOIN?
body: <p>I've looked at <a href="https://stackoverflow.com/questions/3217669/how-to-do-a-join-in-linq-to-sql-with-method-syntax">various questions</a> on SO and <a href="http://www.dotnetperls.com/join" rel="noreferrer">other sites</a>, and this <em>appears</em> to be the correct syntax to perform a <code>JOIN</code> in LINQ, however it's just not working:</p>
  
  <pre><code>var stages = (from stage in entityManager.TPM_TASKSTAGE select stage);
  var results = (from task in pv.TPM_TASK
                 join st in stages on st.STAGEID equals task.STAGEID
                 where task.TASKTYPE == "Solution"
                 select new SolutionTask());
  </code></pre>
  
  <p>Ignore, for now, the fact that I don't actually <em>select</em> anything of interest, but I'd like to have access to the <code>st.NAME</code> property on each row of <code>TPM_TASK</code>.  The two tables are linked by <code>STAGEID</code>.  I get the compiler error:</p>
  
  <blockquote>
    <p>The name 'st' is not in scope on the left side of 'equals'.  Consider
    swapping the expressions on either side of 'equals'.</p>
  </blockquote>
  
  <p>In the LINQ join expression, both <code>st</code> and <code>task</code> have red squigglies.  Please tell me I'm doing something dumb.</p>