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>
 public static Expression <Func <TEntity, bool> > ToExpression <TEntity>(this FilterGroup group)
 {
     return(FilterHelper.GetExpression <TEntity>(group));
 }
Exemple #4
0
 /// <summary>
 /// 将条件转换为查询表达式
 /// </summary>
 public static Expression <Func <TEntity, bool> > ToExpression <TEntity>(this FilterRule rule)
 {
     return(FilterHelper.GetExpression <TEntity>(rule));
 }
Exemple #5
0
 /// <summary>
 /// 获取指定字段和条件组表达式
 /// </summary>
 /// <typeparam name="T">表达式实体类型</typeparam>
 /// <param name="group">查询条件组,如果为null,则直接返回 true 表达式</param>
 /// <param name="filterfields">查询过滤字段集合</param>
 /// <returns>查询表达式</returns>
 public Expression <Func <T, bool> > GetExpression <T>(FilterGroup group, IDictionary <string, string> filterfields)
 {
     return(FilterHelper.GetExpression <T>(group, filterfields));
 }