How do I take the “top n” using NHibernate Criteria API?
-
17-09-2020 - |
Question
How do I take the "top n" using NHibernate Criteria API? Ideally I'd like to use detached criteria.
Solution
something like:-
criteria.SetFirstResult(1);
criteria.SetMaxResults(10);
Will take the first 10 results.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow