alice7
alice7

Reputation: 3884

Getting specific number of rows from db using nhibernate

How can I get specific number of records from nhibernate like 10 or 15 at a time instead of all records. I actually got the answer using criteria.setmaxresults(). But my question is how can I get first 10 records, then next 10 records and then.... next 10.......

Upvotes: 1

Views: 244

Answers (1)

Matt Hinze
Matt Hinze

Reputation: 13679

use SetMaxResults() in conjunction with SetFirstResult()

Upvotes: 1

Related Questions