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 );
This will skip the first 10 rows and will select the next 10.
How can I know how many rows would result because of the query without pagination? I do not want to run another query to get the count.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…