Exemple #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));
 }
Exemple #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));
 }
Exemple #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));
 }
Exemple #4
0
 /// <summary>
 /// 初始化一个<see cref="FilterGroup"/>类型的新实例
 /// </summary>
 /// <param name="operateCode">条件间操作方式的前台码</param>
 public FilterGroup(string operateCode)
     : this(FilterHelper.GetFilterOperate(operateCode))
 {
 }
 public static Expression <Func <TEntity, bool> > ToExpression <TEntity>(this FilterRule rule)
 {
     return(FilterHelper.GetExpression <TEntity>(rule));
 }
 public static Expression <Func <TEntity, bool> > ToExpression <TEntity>(this FilterGroup group)
 {
     return(FilterHelper.GetExpression <TEntity>(group));
 }