/// <summary> /// 添加规则 /// </summary> /// <param name="criterion"></param> public void Add(Criterion criterion) { _criteria.Add(criterion); }
/// <summary> /// 添加规范 /// </summary> /// <param name="criterion"></param> public void Add(Criterion criterion) { if (!IsNamedQuery()) { _criteria.Add(criterion); } else throw new ApplicationException( "You cannot add additionalcriteria to named queries"); }