title: Entity Framework AsNoTracking breaks call to Distinct
body: <p>I am trying to load a list of distinct colors from previously loaded list of products on a page.  So to pull in the products I do this:</p>
  
  <pre><code>var products = Products
      .Include(p =&gt; p.ProductColor)
      .ToList();
  </code></pre>
  
  <p>Then I do some processing on the products them I want to get a list of all of the distinct colors used by the products, so I do this:</p>
  
  <pre><code>var colors = products   
      .Select(p =&gt; p.ProductColor)
      .Distinct();
  </code></pre>
  
  <p>And this works great, however if I add a call to <code>.AsNoTracking()</code> to the original products call, I now get an entry in my color list for each entry in the product list.</p>
  
  <p>Why is there a difference in these two?  Is there a way to keep Entity Framework from tracking the objects (they're being used for read only) and to get the desired behavior?</p>
  
  <p>Here is my query after adding the call to <code>AsNoTracking()</code></p>
  
  <pre><code>var products = Products
      .AsNoTracking()
      .Include(p =&gt; p.ProductColor)
      .ToList();
  </code></pre>