ADO.NET Entity Framework : Paging EntitySQL
Paging in EntitySQL is really easy to achieve. You have got two important sub-clauses (or query operators) are available, SKIP and LIMIT.
So your paging EntitySQL query would ideally look like,
"SELECT VALUE e FROM NorthwindEntities.Customers AS e ORDER BY e.CompanyName SKIP 10 LIMIT 10 ";
The most important part is that you *must* implement ORDER BY clause for SKIP and LIMIT.
using (EntityConnection conn =
string sQueryString = "SELECT VALUE e FROM NorthwindEntities.Customers AS e ORDER BY e.CompanyName SKIP 10 LIMIT 10 ";
using (EntityCommand comm =
EntityDataReader reader =
PS. You need to make CommandBehavior.SequentialAccess for EntityDataReader.