You are passing integer value (FaxID) to OrderBy
method, which expects Expression<Func<TEntity, TKey>>
- that's why you see this error.
Use lambda expression to select key from your entity to order results. It should be something like this (assume you have some constraint on TEntity which makes SomeProperty available for you - otherwise ordering does not make sense here):
return query.OrderBy(t => t.SomeProperty)
.Skip(skip)
.Take(take)
.ToList();