public IObQueryable <TModel> Select(IObQueryable <TModel> queryable) { if (ObGroup == null) { ObGroup = new ObGroup(); } ObGroup.AddGroupBy(queryable.ObGroup.ObProperties.Select(o => (ObProperty)o).ToArray()); return(this); }
public IObQueryable <TModel> GroupBy <TKey>(Expression <Func <TModel, TKey> > keySelector) { if (ObGroup == null) { ObGroup = new ObGroup(); } var body = keySelector.Body; var value = CreateValue(body); if (value is ObProperty obProperty) { ObGroup.AddGroupBy(obProperty); } if (value is object[] objs) { ObGroup.AddGroupBy(objs.Select(o => (ObProperty)o).ToArray()); } return(this); }
public IObQueryable <TModel> Select <TKey>(Expression <Func <TModel[], TKey> > keySelector) { if (ObGroup == null) { ObGroup = new ObGroup(); } var body = keySelector.Body; var value = CreateValue(body); if (value is ObProperty obProperty) { ObGroup.ObProperties.Add(obProperty); } if (value is object[] objs) { foreach (ObProperty property in objs) { ObGroup.ObProperties.Add(property); } } return(this); }