What is NHibernate HQL's Equivalent to T-SQL's TOP Keyword?
Also what is the non-HQL way for saying give me the first 15 of a class?
It's actually pretty easy in HQL:
var top15 = session.CreateQuery("from SomeEntity") .SetFirstResult(0) .SetMaxResults(15) .List<SomeEntity>();
Don't know how to do this using the criteria API though.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With