title: Left join with grouping via linq2db
body: <p>I have the following tables</p>
  
  <pre><code>class Directory
  {
      public long Id { get; set;}
      public string Path { get; set;}
      public IEnumerable&lt;File&gt; Files { get; set;}
  }
  
  class File
  {
      public long Id { get; set;}
      public long DirectoryId { get; set; }
      public string Name { get; set; }
      public Directory Directory { get; set; }
  }
  </code></pre>
  
  <p>How can i get directories grouped by id with appropriate files using left join and linq2db in one query?</p>
  
  <p>I think it should be something like this </p>
  
  <pre><code>var query = from d in db.Direcories
              join f in db.Files on d.Id equals f.DirectoryId into items
              from i in items.DefaultIfEmpty()
              group i by new { d } into g
              select new { Directory = g.Key, Files = ????? };
  
   var result = query.ToList();
  </code></pre>
  
  <p>but i don't know how to get files from group</p>