title: LINQ query needs either ascending or descending in the same query
body: <p>Is there anyway this code can be refactored? The only difference is the order by part.</p>
  
  <p>Idealy I'd like to use a delegate/lambda expression so the code is reusable but I don't know how to conditionally add and remove the query operators OrderBy and OrderByDescending</p>
  
  <pre><code>var linq = new NorthwindDataContext();
  
          var query1 = linq.Customers
              .Where(c =&gt; c.ContactName.StartsWith("a"))
              .SelectMany(cus=&gt;cus.Orders)
              .OrderBy(ord =&gt; ord.OrderDate)
              .Select(ord =&gt; ord.CustomerID);
  
          var query2 = linq.Customers
              .Where(c =&gt; c.ContactName.StartsWith("a"))
              .SelectMany(cus =&gt; cus.Orders)
              .OrderByDescending(ord =&gt; ord.OrderDate)
              .Select(ord =&gt; ord.CustomerID);
  </code></pre>