How do I take the "top n" using NHibernate Criteria API? Ideally I'd like to use detached criteria.
+2
A:
something like:-
criteria.setFirstResult(1);
criteria.setMaxResults(10);
Will take the first 10 results.
Rippo
2010-07-20 06:20:29
SetFirstResult is not needed unless you need to skip records/pages.
Diego Mijelshon
2010-07-20 14:40:01
Good catch - Thanks Diego
Rippo
2010-07-20 14:41:41