title: OrderBy Linq.Expression as parameter = (Of Func(Of T,IComparable)) to perform LinqToEntity is not working
body: <p>I'd like to get this working:</p>
  
  <p>DBSet constructor:</p>
  
  <pre><code>dbset = DataContext().[Set](Of T)()
  </code></pre>
  
  <p>Call: (Count &amp; Page are used for pagination, so Count = 20 and Page = 1 for example, for the first 20 values). Sorting should be by name</p>
  
  <pre><code>LeverancierService.GetLeveranciers(Function(el) el.Name, Count, Page)
  </code></pre>
  
  <p>Equivalent in c#:
      LeverancierService.GetLeveranciers(el=> el.Name, Count, Page)</p>
  
  <p>Method that gives an error (parameters shown above):</p>
  
  <pre><code> Public Overridable Function GetAllPaged(orderby As Expression(Of Func(Of T, IComparable)), ByVal Count As Integer, ByVal Page As Integer) As IEnumerable(Of T)
        Return dbset.OrderBy(orderby).Skip((Page - 1) * Count).Take(Count).ToList()
   End Function
  </code></pre>
  
  <p>Already tried changing it to this, but it gives the same error:</p>
  
  <pre><code> Public Overridable Function GetAllPaged(Of TOrderBy)(orderby As Expression(Of Func(Of T, TOrderBy)), ByVal Count As Integer, ByVal Page As Integer) As IEnumerable(Of T)
          Return dbset.OrderBy(orderby).Skip((Page - 1) * Count).Take(Count).ToList()
   End Function
  </code></pre>
  
  <p>Error:</p>
  
  <pre><code> Unable to cast the type 'System.String' to type 'System.IComparable'. LINQ to Entities only supports casting Entity Data Model primitive types.
  </code></pre>
  
  <p>Any idea how to do this?</p>
  
  <p>Extra info:</p>
  
  <p>I'm in a DDD-layered application, so the parameter should stay the same as the called method is an overridden interface (eg. if i change this, i have to do this for 200 times or so, because it's in VB.Net and not in C# (= 1 change)  )</p>