title: entity framework not generating second orderby
body: <p>My problem is that I am trying to make 2 <code>OrderBy</code> but the second one is never generated for entity framework, I inspected the generated query.</p>
  
  <p>This is what I am trying to do</p>
  
  <pre><code> var query = model.SomeTable.Where(condition);
   if (somecondition)
       query = query.OrderByDescending(o =&gt; o.Table1.Col1).OrderBy(c =&gt; c.Table1.Table2.SomeColumn);
   var result = query.Select(c =&gt; new 
                               {
                                   //selection here
                               });
  </code></pre>
  
  <p>Order by for <code>Table1.Table2.SomeColumn</code> is generated, but the second OrderBy <code>Table1.Col1</code> is never generated and consequently my results are wrong.</p>
  
  <p>Any ideas? </p>