title: .NET Linq Left Join
body: <p>I have 2 tables in SQL:</p>
  <pre><code>Table 1 
  Step Id
  Step Name
  
  Table 2
  Profile Id
  Step Id
  Completed
  </code></pre>
  <p>I would like to return the following results even if there is not match in table 2:</p>
  <pre><code>Results
  Table1.Step Id
  Table1.Step Name
  Table2.Profile Id
  Table2.Completed 
  </code></pre>
  <p>The way I am doing this in SQL is the following:</p>
  <pre><code>select * from [Table 1] t1
  left join [Table 2] t2
  on t1.Step Id = t2.Step Id
  </code></pre>
  <p>This produces the results I expect.</p>
  <p>When I translate this into linq:</p>
  <pre><code>public static List&lt;UserCompletion&gt; GetStepCompletion(string category, string profileid) { 
  
  List&lt;Step&gt; step = GetSteps(category);
  List&lt;UserStep&gt; userStep = GetUserSteps(category, profileId);    
  
  var q = from s in step
           join us in userStep
           on s.Id equals us.StepId
           select new UserCompletion
           {
             StepId = s.Id,
             Headline = s.StepName,
             ProfileId = us.ProfileId
             Completed= us.Completed
            };
  
       return q.ToList();
  
  }
  </code></pre>
  <p>It works but like a <code>JOIN</code> not a <code>left join</code>. I only get matching results back.</p>
  <p>Also, <code>UserCompletion</code> is an object that I return from this method.</p>