title: In LINQ, how can I do an .OrderBy() on data that came from my .Include()?
body: <p>Here's what I'm doing:</p>
  
  <pre><code>List&lt;Category&gt; categories = 
    db.Categories.Include("SubCategories").OrderBy(c =&gt; c.Order).ToList();
  </code></pre>
  
  <p>I have a column on my categories table called "Order" which simply holds an integer that gives the table some kind of sorting order.</p>
  
  <p>I have the same column on my "SubCategories" table...</p>
  
  <p>I want to know the simplest solution to add the sort on my subcategories table... something like:</p>
  
  <pre><code>List&lt;Category&gt; categories = 
    db.Categories.Include("SubCategories").OrderBy(c =&gt; c.Order)
       .ThenBy(c =&gt; c.SubCategories as x =&gt; x.Order).ToList();
  </code></pre>
  
  <p>I'd like to keep it in this type of LINQ format... (method format)...</p>
  
  <p>Keep in mind, i'm working in MVC and need to return it to a view as a model.  I've been having trouble with errors because of AnonymousTypes...</p>