/// <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); }
/// <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(); } }
/// <summary> /// 进行GroupBy操作 /// </summary> /// <param name="groupBy"></param> /// <returns></returns> public QuerySection <T> GroupBy(GroupByClip groupBy) { return(query.GroupBy(groupBy)); }
/// <summary> /// 进行GroupBy操作 /// </summary> /// <param name="groupBy"></param> /// <returns></returns> public QuerySection <T> GroupBy(GroupByClip groupBy) { this.groupBy = groupBy; return(this); }
/// <summary> /// 进行分组操作 /// </summary> /// <param name="groupBy"></param> /// <returns></returns> public TableRelation <T> GroupBy(GroupByClip groupBy) { section.GroupBy(groupBy); return(this); }