摘要:
1、MYSQL5 数据库<?xml version="1.0" encoding="utf-8" ?><hibernate-configuration xmlns="urn:nhibernate-configuration-2.2"> <session-factory name="NHibernate.Test"> <property name="connection.provider">NHibernate.Connection.DriverCo 阅读全文
摘要:
1、创建ICriteria ICriteria iCriteria = session.CreateCriteria(typeof(IEPBooking)); iCriteria.Add(Restrictions.Like("CityCode", criteria.CityId));2、创建克隆对象var totalCriteria = iCriteria.Clone() as ICriteria;3、统计总记录数this.PageRecordCount = Convert.ToInt32(totalCriteria.SetProjection( Projections.C 阅读全文
摘要:
QBC (Query By Criteria) 主要有Criteria,Criterion,Oder,Restrictions,Expresss类组成比较运算符 HQL运算符 QBC运算符 含义 =Restrictions.eq() 等于 <> Restrictions.not(Exprission.eq()) 不等于 > Restrictions.gt() 大于 >= Restrictions.ge() 大于等于 < Restrictions.lt() 小于 <= Restrictions.le() 小于等于 is null Restrictions.is 阅读全文