For example, I want to populate a gridview control in an ASP.NET web page with only the data necessary for the # of rows displayed. How can NHibernate support this?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
ICriteriahas aSetFirstResult(int i)method, which indicates the index of the first item that you wish to get (basically the first data row in your page).It also has a
SetMaxResults(int i)method, which indicates the number of rows you wish to get (i.e., your page size).For example, this criteria object gets the first 10 results of your data grid: