Example #1
0
 /// <summary>
 /// 判断GroupByClip是否为null或空
 /// </summary>
 /// <param name="where"></param>
 /// <returns></returns>
 public static bool IsNullOrEmpty(GroupByClip group)
 {
     if ((object)group == null || string.IsNullOrEmpty(group.ToString()))
     {
         return(true);
     }
     return(false);
 }
Example #2
0
        /// <summary>
        /// 自定义一个GroupBy条件
        /// </summary>
        /// <param name="fields"></param>
        public GroupByClip(params Field[] fields)
        {
            if (fields != null && fields.Length > 0)
            {
                GroupByClip group = GroupByClip.None;
                foreach (Field field in fields)
                {
                    group &= field.Group;
                }

                this.groupBy = group.ToString();
            }
        }
Example #3
0
 /// <summary>
 /// 进行GroupBy操作
 /// </summary>
 /// <param name="groupBy"></param>
 /// <returns></returns>
 public QuerySection <T> GroupBy(GroupByClip groupBy)
 {
     return(query.GroupBy(groupBy));
 }
Example #4
0
 /// <summary>
 /// 进行GroupBy操作
 /// </summary>
 /// <param name="groupBy"></param>
 /// <returns></returns>
 public QuerySection <T> GroupBy(GroupByClip groupBy)
 {
     this.groupBy = groupBy;
     return(this);
 }
Example #5
0
 /// <summary>
 /// 进行分组操作
 /// </summary>
 /// <param name="groupBy"></param>
 /// <returns></returns>
 public TableRelation <T> GroupBy(GroupByClip groupBy)
 {
     section.GroupBy(groupBy);
     return(this);
 }