To get a page from a database I have to execute something like this:
var cs = ( from x in base.EntityDataContext.Corporates
select x ).Skip( 10 ).Take( 10
To get the total number of records before skip/take you have to run a separate query. Getting the actual number returned would use Count(), but wouldn't result in another query if the original query was materialized.
var q = from x in base.EntityDataContext.Corporates
select x;
var total = q.Count();
var cs = q.Skip(10).Take(10);
var numberOnSelectedPage = cs.Count();