/// <summary>
 /// 初始化范围过滤条件
 /// </summary>
 /// <param name="propertyExpression">属性表达式</param>
 /// <param name="min">最小值</param>
 /// <param name="max">最大值</param>
 /// <param name="boundary">包含边界</param>
 protected SegmentCriteriaBase(Expression <Func <TEntity, TProperty> > propertyExpression, TValue?min, TValue?max, Boundary boundary)
 {
     _builder            = new PredicateExpressionBuilder <TEntity>();
     _propertyExpression = propertyExpression;
     _min      = min;
     _max      = max;
     _boundary = boundary;
 }
Exemplo n.º 2
0
 /// <summary>
 /// 初始化范围过滤条件
 /// </summary>
 /// <param name="propertyExpression">属性表达式</param>
 /// <param name="min">最小值</param>
 /// <param name="max">最大值</param>
 protected SegmentCriteriaBase(Expression <Func <TEntity, TProperty> > propertyExpression, TValue?min, TValue?max)
 {
     Builder            = new PredicateExpressionBuilder <TEntity>();
     PropertyExpression = propertyExpression;
     Min = min;
     Max = max;
     if (IsMinGreaterMax(min, max))
     {
         Min = max;
         Max = min;
     }
 }