Hi
How would I do what Scott has done in one call using nHibernate 2 ObjectDataSource
http://weblogs.asp.net/scottgu/archive/2006/01/07/434787.aspx
below is my Data access method
public IList GetListOfUser(int rows, int pageIndex) {
IList userList = null;
using (ITransaction tx = _session.BeginTransaction()) {
try {
userList = _session.CreateQuery("Select u from User u where u.DateSubmitted is not null")
.SetFirstResult(rows * (pageIndex - 1) + 1)
.SetMaxResults(rows)
.List();
tx.Commit();
} catch (NHibernate.HibernateException ex) {
tx.Rollback();
AppUtil.LogHelper.WriteLog(LogLevel.ERROR, ex.ToString());
throw;
}
}
return userList;
}