title: Will iterating over Linq Lookup make a db query for each iteration
body: <p>Im using Entity Framework, and lets say I have some class stored in a DB:</p>
  
  <pre><code>class A
  {
    public int Foo { get; set; }
    public int Bar { get; set; }
  }
  </code></pre>
  
  <p>Now, if I start iterating over the result of <code>ToLookup</code> like this:</p>
  
  <pre><code>var data = db.Data.ToLookup(x =&gt; x.Foo);
  foreach (var group in data)
  {
      Console.WriteLine(group.Key);
  
      foreach (var item in group)
      {
          // use item... Console.WriteLine("\t" + item.Bar);
      }
  }
  </code></pre>
  
  <p>Will this code generate only one query?</p>
  
  <p>Will each iteration make a query to the DB? Or is the result of ToLookup materialized so its like iterating over some in-memory IEnumerable?</p>