Question

How do I take the "top n" using NHibernate Criteria API? Ideally I'd like to use detached criteria.

Was it helpful?

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
scroll top