Database paging in Entity Framework is often carried out in the way shown below using LINQ to Entities:
int totalRecords = EntityContext.Context.UserSet.Count; var list = EntityContext.Context.UserSet .Skip(startingRecordNumber) .Take(pageSize) .ToList();
This leads to calls to the TWO database.
Tell me how to make only one database call, please.
Why is it bad to make two calls? They are brief and concise questions. Many tiny queries may be supported by databases.
You won't get much benefit from designing a complicated solution to do a single query for paging.