title: Conditional Join with LINQ
body: <p>I would like to create a LINQ join statement equivalent of a <code>Left Join</code></p>
  
  <p>My tables are set up like so:</p>
  
  <pre><code>Recipe
      RecipeID
      ...
  
  Instruction
      RecipeID
      StepID
      SomeFlag
      ...
  </code></pre>
  
  <p>Equivalent SQL:</p>
  
  <pre><code>SELECT *
  FROM Recipe r
  LEFT JOIN Instruction i
      ON r.RecipeID = i.RecipeID
      AND SomeFlag &gt; 0
  </code></pre>
  
  <p>This is what I have so far:</p>
  
  <pre><code>var tmp = db.Recipe
      .GroupJoin(
          db.Instruction,
          r =&gt; r.RecipeID,
          i =&gt; i.RecipeID,
          (r, i) =&gt; new {r, i},
          ???);
  </code></pre>
  
  <p>Firstly, is <code>GroupJoin</code> the correct choice for this type of operation? From what I understand, Join is equivalent to the SQL 'Inner Join' and GroupJoin is equivalent to 'Left Join'. Second, what is the correct syntax to obtain my desired result? I have been searching for a while and I can't seem to find a suitable answer <strong>using extension methods</strong>.</p>