title: DISTINCT() and ORDERBY issue
body: <p>I am learning about LINQ-to-SQL and everything was going well until something strange happened:</p>
  
  <p>I tried to make an example of <code>distinct</code>, so, using the Northwind dabatase I wrote the following query:</p>
  
  <pre><code>var query = 
      from o in db.Orders
      orderby o.CustomerID
      select new
      {
          o.CustomerID
      };
  </code></pre>
  
  <p>If I print the SQL generated by LINQ-to-SQL for the query stored in <code>query</code> it looks like this:</p>
  
  <pre><code>SELECT [t0].[CustomerID]
  FROM [dbo].[Orders] AS [t0]
  ORDER BY [t0].[CustomerID]
  </code></pre>
  
  <p>So, as usual, the query brings all the <code>CustomerID</code> for each <code>Order</code> in the <code>Orders</code> table ordered alphabetically. </p>
  
  <p>But! If I use the <code>Distinct()</code> method like this:</p>
  
  <pre><code>var query = (
      from o in db.Orders
      orderby o.CustomerID
      select new
      {
          o.CustomerID
      }).Distinct();
  </code></pre>
  
  <p>The query brings the expected results of the <code>Distinct</code> clause, but the <code>CustomerID</code>s are not ordered despite I wrote <code>orderby o.CustomerID</code>!</p>
  
  <p>The SQL query for this second LINQ query is the following:</p>
  
  <pre><code>SELECT DISTINCT [t0].[CustomerID]
  FROM [dbo].[Orders] AS [t0]
  </code></pre>
  
  <p>As we can see **the <code>ORDER BY</code> clause is missing. Why is that?</p>
  
  <p>Why does the <code>ORDER BY</code> clause disappears when I use the <code>Distinct()</code> method?</p>