nhibernate分页与排序代码
//设置排序
criteria.AddOrder( new Order( sortField, direction) )
//设置分页
criteria.SetFirstResult( (currentPageIndex.Value-1) * pageSize.Value )
.SetMaxResults( pageSize.Value );
摘自 thankplus
补充:Web开发 , ASP.Net ,
//设置排序
criteria.AddOrder( new Order( sortField, direction) )
//设置分页
criteria.SetFirstResult( (currentPageIndex.Value-1) * pageSize.Value )
.SetMaxResults( pageSize.Value );
补充:Web开发 , ASP.Net ,