How can I view pages with nHibernate using CTE?

Is there any example code someone can show me that will render through the data in a given table and use CTEs under the hood?

Is nhibernate supposed to work on different databases out of the box? I am using MS SQL Server 2008 now, but what if a customer wants to use Oracle someday?

0


a source to share


1 answer


For swap, you simply define the start and end result in the query:

IQuery q = sess.CreateQuery("from DomesticCat cat");
q.SetFirstResult(20);
q.SetMaxResults(10);
IList cats = q.List();

      

See reference documents



NHibernate is supposed to work across different databases. Many dialects are implemented and available out of the box. SqlServer and Oracle are very well supported.

See the reference documents for a list of supported dialects.

+2


a source







All Articles