As part of a generic repository pattern I have a DbSet<TEntity>
- a generic Entity Framework IQueryable
collection. The type of TEntity
could vary, but I know I want to sort by whatever the primary key is.
Can I do this generically in EF, without knowing the type in advance? Otherwise how can we do Skip() -> Take() for repeaters without knowing the type?