标签:style blog http color io os ar for div
public IList<Student> GetStudentByPage(int pageSize, int pageIndex, string SName) { ISession session = NHibernateHelper.GetCurrentSession(); ITransaction trans = session.BeginTransaction(); //HQL查询 IList<Student> studentList = new List<Student>(); //string sql = "from Student"; //studentList = session.CreateQuery(sql) // .SetFirstResult((pageIndex - 1) * pageSize) // .SetMaxResults(pageSize) // .List<Student>(); //SQL查询 //studentList = session.CreateSQLQuery("SELECT * FROM Student") // .SetFirstResult((pageIndex - 1) * pageSize) // .SetMaxResults(pageSize) // .SetResultTransformer(Transformers.AliasToBean<Student>()).List<Student>(); return studentList; }
标签:style blog http color io os ar for div
原文地址:http://www.cnblogs.com/caishuhua226/p/3985215.html