I have some problems with a slow query in Entity Framework in C#. I have created an extension method called Page to handle paging, but when I use it the query gets really sl
Your extension method should be over IQueryable so that EF can process the expression and generate the SQL query with pagination.
Since your using IEnumerable, the Page method will invoke Skip and Take of IEnumerable. This will cause enumeration of the result of the query that was built up to that point (before the call to Page) and make the pagination in memory, over all the returned items, instead of including pagination on the DB query.