title: Order by must be called before calling a skip
body: <p>I'm getting an Error when trying to execute the skip method. The method 'Skip' is only supported for sorted input in LINQ to Entities. The method 'OrderBy' must be called before the method 'Skip'.</p>
  
  <p>I'm well aware that the orderby must be called prior to calling the skip and I am calling it prior to the skip in another function directly preceding the call.</p>
  
  <pre><code>AddOrderBy(AdvTitleResults, ColumnNumber, OrderByDesc);
  
  var SearchTitles = AdvTitleResults.Skip(PageNum * NumberOfResults)
                                    .Take(NumberOfResults).ToList();
  </code></pre>
  
  <p>The order by function looks like this the default assures that it is always assigned:</p>
  
  <pre><code>private void AddOrderBy(IQueryable&lt;Title&gt; Results, int ColumnNumber, bool OrderByDesc)
  {
      switch (ColumnNumber)
      {
          case 1:
              if (OrderByDesc)
                  Results = Results.OrderByDescending(t =&gt; t.FK_ContentType);
             else
                  Results = Results.OrderBy(t =&gt; t.FK_ContentType);
              break;
          case 2:
              if (OrderByDesc)
                  Results = Results.OrderByDescending(t =&gt; t.TitleFullName);
              else
                  Results = Results.OrderBy(t =&gt; t.TitleFullName);
              break;
          default:
              if (OrderByDesc)
                  Results = Results.OrderByDescending(t =&gt; t.ID);
              else
                  Results = Results.OrderBy(t =&gt; t.ID);
              break;
      }
  }
  </code></pre>
  
  <p>Could anyone explain why this doesn't work? </p>