Exemplo n.º 1
0
 public static decimal?Sum <TSource>(this IQueryable <TSource> source, Expression <Func <TSource, decimal?> > selector)
 {
     Check.SourceAndSelector(source, selector);
     return(source.Provider.Execute <decimal?>(StaticCall(MakeGeneric(MethodBase.GetCurrentMethod(), typeof(TSource)), source.Expression, Expression.Quote(selector))));
 }
Exemplo n.º 2
0
 public static IQueryable <TResult> SelectMany <TSource, TResult>(this IQueryable <TSource> source, Expression <Func <TSource, int, IEnumerable <TResult> > > selector)
 {
     Check.SourceAndSelector(source, selector);
     return(source.Provider.CreateQuery <TResult>(StaticCall(MakeGeneric(MethodBase.GetCurrentMethod(), typeof(TSource), typeof(TResult)), source.Expression, Expression.Quote(selector))));
 }