title: Include unrelated table in Linq to entity query
body: <p>I have the following simplified setup:</p>
  
  <pre><code>Public User
  {
  
    //Primary key
    public int Id {get;set;}
  
    public string Name {get; set;}
  }
  
  Public UserInfo
  {
  
    //Primary key
    public int Id {get;set;}
  
    //Foreign key to user table
    public int userKey {get; set;}
  }
  </code></pre>
  
  <p>The relationship between the tables is one user to Many userInfo</p>
  
  <p>I am trying to select from the <code>user</code> table and include the <code>userInfo</code> table.</p>
  
  <p>I cannot do this:</p>
  
  <pre><code>var users = Context.user.Include(u =&gt; u.userInfos);
  </code></pre>
  
  <p>as there is no reference to the <code>UserInfo</code> table from the user table.</p>
  
  <p>I can do this:</p>
  
  <pre><code>context.userInfo.include(x =&gt; x.user)
  </code></pre>
  
  <p>but if there are no corresponding entries in the userInfo table, this will not return any results, which is not what I want. Also, this will return one row for each userInfo, whereas I want one row for user, with a list of userInfo as a parameter.</p>
  
  <p>Similarly I could join the tables like this:</p>
  
  <pre><code>var users = from us in Context.user
      join inf in Context.userInfo
      on us.Id equals inf.userKey
      select new //etc
  </code></pre>
  
  <p>But this will also return one row per userInfo entry, the same problem as above.</p>
  
  <p>To summarise, is there a way of including this table to produce a result in the same way as the <code>include</code> function does.</p>
  
  <p>I know I could adjust my setup to all me to include this, but that is not what I am asking here.</p>
  
  <p>I suspect this cannot be done, but from all my googling so far I have not been able to find a definitive answer....</p>