public static IQueryable <TResult> SelectMany <TSource, TCollection, TResult>(this IQueryable <TSource> source, Expression <Func <TSource, IEnumerable <TCollection> > > collectionSelector, Expression <Func <TSource, TCollection, TResult> > resultSelector) { Check.SourceAndCollectionSelectorAndResultSelector(source, collectionSelector, resultSelector); return(source.Provider.CreateQuery <TResult>(StaticCall(MakeGeneric(MethodBase.GetCurrentMethod(), typeof(TSource), typeof(TCollection), typeof(TResult)), source.Expression, Expression.Quote(collectionSelector), Expression.Quote(resultSelector)))); }