Exemplo n.º 1
0
 public static IQueryable <IGrouping <TKey, TElement> > GroupBy <TSource, TKey, TElement>(this IQueryable <TSource> source, Expression <Func <TSource, TKey> > keySelector, Expression <Func <TSource, TElement> > elementSelector, IEqualityComparer <TKey> comparer)
 {
     Check.SourceAndKeyElementSelectors(source, keySelector, elementSelector);
     return(source.Provider.CreateQuery <IGrouping <TKey, TElement> >(StaticCall(MakeGeneric(MethodBase.GetCurrentMethod(), typeof(TSource), typeof(TKey), typeof(TElement)), source.Expression, Expression.Quote(keySelector), Expression.Quote(elementSelector), Expression.Constant(comparer))));
 }