Example #1
0
 /// <summary>
 /// 获取指定查询条件的查询表达式
 /// </summary>
 /// <typeparam name="T">表达式实体类型</typeparam>
 /// <param name="rule">查询条件,如果为null,则直接返回 true 表达式</param>
 /// <returns>查询表达式</returns>
 public virtual Expression <Func <T, bool> > GetExpression <T>(FilterRule rule)
 {
     return(FilterHelper.GetExpression <T>(rule));
 }
Example #2
0
 /// <summary>
 /// 获取指定查询条件组的查询表达式
 /// </summary>
 /// <typeparam name="T">表达式实体类型</typeparam>
 /// <param name="group">查询条件组,如果为null,则直接返回 true 表达式</param>
 /// <returns>查询表达式</returns>
 public virtual Expression <Func <T, bool> > GetExpression <T>(FilterGroup group)
 {
     return(FilterHelper.GetExpression <T>(group));
 }
Example #3
0
 /// <summary>
 /// 验证指定查询条件组是否能正常转换为表达式
 /// </summary>
 /// <param name="group">查询条件组</param>
 /// <param name="type">实体类型</param>
 /// <returns>验证操作结果</returns>
 public virtual OperationResult CheckFilterGroup(FilterGroup group, Type type)
 {
     return(FilterHelper.CheckFilterGroup(group, type));
 }
Example #4
0
 /// <summary>
 /// 初始化一个<see cref="FilterGroup"/>类型的新实例
 /// </summary>
 /// <param name="operateCode">条件间操作方式的前台码</param>
 public FilterGroup(string operateCode)
     : this(FilterHelper.GetFilterOperate(operateCode))
 {
 }
Example #5
0
 public static Expression <Func <TEntity, bool> > ToExpression <TEntity>(this FilterRule rule)
 {
     return(FilterHelper.GetExpression <TEntity>(rule));
 }
Example #6
0
 public static Expression <Func <TEntity, bool> > ToExpression <TEntity>(this FilterGroup group)
 {
     return(FilterHelper.GetExpression <TEntity>(group));
 }