title: How can I order at more than one level in a LINQ expression?
body: <p>I have the following LINQ expression:</p>
  
  <pre><code>public IList&lt;Objective&gt; GetObjectives(int examId)
      {
          var objectives = _objectivesRepository
              .GetAll()
              .Where(o =&gt; o.ExamId == examId || examId == 0)
              .Include(o =&gt; o.ObjectiveDetails)
              .ToList();
          return objectives;
      }
  
  public partial class Objective
  {
      public int ObjectiveId { get; set; }
      public int ExamId { get; set; }
      public int Number { get; set; }
      public virtual ICollection&lt;ObjectiveDetail&gt; ObjectiveDetails { get; set; }
  }
  
  public partial class ObjectiveDetail
  {
      public int ObjectiveDetailId { get; set; }
      public int ObjectiveId { get; set; }
      public int Number { get; set; }
      public string Text { get; set; }
  }
  </code></pre>
  
  <p>How can I modify this expression so the Objective is returned in order of <code>Number</code> and the ObjectiveDetails are returned in order of <code>Number</code>?</p>