title: Linq query - List within List
body: <p>I'm trying to select a list that contains <code>Fund.Name</code> and <code>List&lt;Investment&gt;</code>.</p>
  
  <pre class="lang-cs prettyprint-override"><code>var funds = new List&lt;Fund&gt;
  {
      new Fund { Id = 1 , Name = "good" },
      new Fund { Id = 2, Name = "bad" }
  };
  
  var investments = new List&lt;Investment&gt;
  {
      new Investment { Fund = funds[0], Value = 100 },
      new Investment { Fund = funds[0], Value = 200 },
      new Investment { Fund = funds[1], Value = 300 }
  };
  </code></pre>
  
  <p>Then I'm trying to create the query with this:</p>
  
  <pre class="lang-cs prettyprint-override"><code>var query = from f in funds
              join i in investments
              on f.Id equals i.Fund.Id
              select new { f.Name, i };
  </code></pre>
  
  <p>I wanted something like this:</p>
  
  <pre><code>{ Name = good, {{ Id = 1, Value = 100 }, { Id = 1, Value = 200 }}},
  { Name = bad, { Id = 2, Value = 300 }}
  </code></pre>
  
  <p>But I'm getting something like this:</p>
  
  <pre><code>{ Name = good, { Id = 1, Value = 100 }},
  { Name = good, { Id = 1, Value = 200 }},
  { Name = bad, { Id = 2, Value = 300 }}
  </code></pre>