I have an NHibernate Dao..lets called MyClassDao for a better name.
I am writing the following code.
MyClassDao myDao = new MyClassDao();
var values = myDao.GetByCriteria(Restrictions.Eq("Status", someStatusValue));
I use this in Unit Test to return values from a database. However, to run a test that is too long, in my opinion, takes more than 30 seconds ... so what I would like to do is limit the result set pulled backward ... say, to 5 values.
in sql I would do something like the following to achieve something like this
set rowcount 5
select * from whatever_table
set rowcount 0
Is there a way ... without using NHibernate's query language to limit the size of the result set?
source
share