/// <summary>
 /// 创建小于等于运算表达式
 /// </summary>
 /// <param name="left">左操作数</param>
 /// <param name="value">值</param>
 public static Expression LessEqual(this Expression left, object value) => left.LessEqual(Lambdas.Constant(left, value));
 /// <summary>
 /// 获取lambda表达式的值
 /// </summary>
 /// <typeparam name="T">对象类型</typeparam>
 public static object Value <T>(this Expression <Func <T, bool> > expression)
 {
     return(Lambdas.GetValue(expression));
 }
 /// <summary>
 /// 创建大于运算表达式
 /// </summary>
 /// <param name="left">左操作数</param>
 /// <param name="value">值</param>
 public static Expression Greater(this Expression left, object value) => left.Greater(Lambdas.Constant(left, value));
Exemplo n.º 4
0
 /// <summary>
 /// 添加表达式
 /// </summary>
 /// <param name="property">属性表达式</param>
 /// <param name="operator">运算符</param>
 /// <param name="value">值</param>
 public void Append <TProperty>(Expression <Func <TEntity, TProperty> > property, Operator @operator, object value)
 {
     _result = _result.And(_parameter.Property(Lambdas.GetMember(property)).Operation(@operator, value));
 }