title: Parallel.ForEach Slower than ForEach
body: <p>Here is the code:</p>
  
  <pre><code>using (var context = new AventureWorksDataContext())
  {
      IEnumerable&lt;Customer&gt; _customerQuery = from c in context.Customers
                                             where c.FirstName.StartsWith("A")
                                             select c;
  
      var watch = new Stopwatch();
      watch.Start();
  
      var result = Parallel.ForEach(_customerQuery, c =&gt; Console.WriteLine(c.FirstName));
  
      watch.Stop();
      Debug.WriteLine(watch.ElapsedMilliseconds);
  
      watch = new Stopwatch();
      watch.Start();
  
      foreach (var customer in _customerQuery)
      {
          Console.WriteLine(customer.FirstName);
      }
  
      watch.Stop();
      Debug.WriteLine(watch.ElapsedMilliseconds);
  }
  </code></pre>
  
  <p>The problem is, <code>Parallel.ForEach</code> takes about 400ms vs a regular <code>foreach</code>, which takes about 40ms. What exactly am I doing wrong and why doesn't this work as I expect it to?</p>