title: LINQ: display results from empty lists
body: <p>I've created two entities (simplified) in C#:</p>
  
  <pre><code>class Log {  
      entries = new List&lt;Entry&gt;();
  
      DateTime Date { get; set; }  
      IList&lt;Entry&gt; entries { get; set; }  
  }  
  
  class Entry {  
      DateTime ClockIn { get; set; }  
      DateTime ClockOut { get; set; }  
  }  
  </code></pre>
  
  <p>I am using the following code to initialize the objects:</p>
  
  <pre><code>Log log1 = new Log() {
      Date = new DateTime(2010, 1, 1),                
  };
  log1.Entries.Add(new Entry() {
      ClockIn = new DateTime(0001, 1, 1, 9, 0, 0),
      ClockOut = new DateTime(0001, 1, 1, 12, 0, 0)
  });
  
  Log log2 = new Log()
  {
      Date = new DateTime(2010, 2, 1),
  };
  </code></pre>
  
  <p>The method below is used to get the date logs:</p>
  
  <pre><code>var query =  
      from l in DB.GetLogs()
      from e in l.Entries  
      orderby l.Date ascending  
      select new  
      {  
          Date = l.Date,  
          ClockIn = e.ClockIn,  
          ClockOut = e.ClockOut,  
      };  
  </code></pre>
  
  <p>The result of the above LINQ query is:</p>
  
  <pre><code>/*
   Date        | Clock In   | Clock Out
   01/01/2010  | 09:00      | 12:00    
  */
  </code></pre>
  
  <p>My question is, what is the best way to rewrite the LINQ query above to include the results from the second object I created (Log2), since it has an empty list. In the other words, I would like to display all dates even if they don't have time values.</p>
  
  <p>The expected result would be:</p>
  
  <pre><code>/*
   Date        | Clock In   | Clock Out
   01/01/2010  | 09:00      | 12:00    
   02/01/2010  |            |            
  */
  </code></pre>