I have an NHibernate Dao..lets call it MyClassDao for want of a better name.
I am writing the following code.
MyClassDao myDao = new MyClassDao();
var values = myDao.GetByCriteria(Restrictions.Eq("Status", someStatusValue));
I am using this in a Unit Test to pull back values from the database. However, it is taking over 30 seconds to run the test which is too long in my opinion...so what I'd like to do is limit the result set being pulled back...say to about 5 values.
in sql I would do something like the following to to achieve something like this
set rowcount 5
select * from whatever_table
set rowcount 0
Is there a way...without using the NHibernate Query language to restrict the size of a result set?