Method GroupJoin
GroupJoin<TOuter, TInner, TKey, TResult>(IQueryable<TOuter>, IMongoCollection<TInner>, Expression<Func<TOuter, TKey>>, Expression<Func<TInner, TKey>>, Expression<Func<TOuter, IEnumerable<TInner>, TResult>>)
Correlates the elements of two sequences based on key equality and groups the results.
public static IQueryable<TResult> GroupJoin<TOuter, TInner, TKey, TResult>(this IQueryable<TOuter> outer, IMongoCollection<TInner> inner, Expression<Func<TOuter, TKey>> outerKeySelector, Expression<Func<TInner, TKey>> innerKeySelector, Expression<Func<TOuter, IEnumerable<TInner>, TResult>> resultSelector)
Parameters
outerIQueryable<TOuter>The first sequence to join.
innerIMongoCollection<TInner>The collection to join to the first sequence.
outerKeySelectorExpression<Func<TOuter, TKey>>A function to extract the join key from each element of the first sequence.
innerKeySelectorExpression<Func<TInner, TKey>>A function to extract the join key from each element of the second sequence.
resultSelectorExpression<Func<TOuter, IEnumerable<TInner>, TResult>>A function to create a result element from an element from the first sequence and a collection of matching elements from the second sequence.
Returns
- IQueryable<TResult>
An IQueryable<T> that contains elements of type
TResultobtained by performing a grouped join on two sequences.
Type Parameters
TOuterThe type of the elements of the first sequence.
TInnerThe type of the elements of the second sequence.
TKeyThe type of the keys returned by the key selector functions.
TResultThe type of the result elements.