Exemple #1
0
 public FetchManyExpression(CategoryType type, IExpression predicate, IExpression first, IExpression last, List <string> include, OrderByClauseList orderBy)
 {
     this.type      = type;
     this.predicate = predicate;
     this.first     = first;
     this.last      = last;
     this.include   = include;
     this.orderBy   = orderBy;
 }
Exemple #2
0
 /// <summary>
 /// 添加排序条件
 /// </summary>
 /// <param name="fieldName"></param>
 /// <param name="order"></param>
 public virtual void AddOrderBy(string fieldName, Sorting order)
 {    //防Sql注入
     if (CheckSql(fieldName))
     {
         OrderByClauseList.Add(new OrderByClause(fieldName, order));
         if (string.IsNullOrEmpty(this.orderSQLString))
         {
             this.orderSQLString += " order by";
         }
         else
         {
             this.orderSQLString += ",";
         }
         if (order == Sorting.Asc)
         {
             this.orderSQLString += " " + fieldName + " asc";
         }
         else
         {
             this.orderSQLString += " " + fieldName + " desc";
         }
     }
 }
Exemple #3
0
 public FetchManyStatement(CategoryType type, IExpression filter, IExpression first, IExpression last, List <string> include, OrderByClauseList orderBy, ThenWith thenWith)
     : base(type, filter, first, last, include, orderBy)
 {
     this.thenWith = thenWith;
 }