[]
        
(Showing Draft Content)

C1.LiveLinq.IndexedQueryExtensions.Join

Join Method

Join<TOuter, TInner, TKey, TResult>(IIndexedSource<TOuter>, IEnumerable<TInner>, Expression<Func<TOuter, TKey>>, Expression<Func<TInner, TKey>>, Expression<Func<TOuter, TInner, TResult>>)

Correlates the elements of two collections based on matching keys.

Declaration
public static IIndexedSource<TResult> Join<TOuter, TInner, TKey, TResult>(this IIndexedSource<TOuter> outer, IEnumerable<TInner> inner, Expression<Func<TOuter, TKey>> outerKeySelector, Expression<Func<TInner, TKey>> innerKeySelector, Expression<Func<TOuter, TInner, TResult>> resultSelector)
Parameters
Type Name Description
IIndexedSource<TOuter> outer

The first collection to join.

IEnumerable<TInner> inner

The second collection to join.

Expression<Func<TOuter, TKey>> outerKeySelector

A function to extract the join key from each element of the first collection.

Expression<Func<TInner, TKey>> innerKeySelector

A function to extract the join key from each element of the second collection.

Expression<Func<TOuter, TInner, TResult>> resultSelector

A function to create a result element from two matching elements.

Returns
Type Description
IIndexedSource<TResult>

An IIndexedSource<TResult> that has elements of type TResult that are obtained by performing an inner join on two collections.

Type Parameters
Name Description
TOuter

The type of the elements of the first collection.

TInner

The type of the elements of the second collection.

TKey

The type of the keys returned by the key selector functions.

TResult

The type of the result elements.

Join<TOuter, TInner, TKey, TResult>(IEnumerable<TOuter>, IIndexedSource<TInner>, Expression<Func<TOuter, TKey>>, Expression<Func<TInner, TKey>>, Expression<Func<TOuter, TInner, TResult>>)

Correlates the elements of two collections based on matching keys.

Declaration
public static IIndexedSource<TResult> Join<TOuter, TInner, TKey, TResult>(this IEnumerable<TOuter> outer, IIndexedSource<TInner> inner, Expression<Func<TOuter, TKey>> outerKeySelector, Expression<Func<TInner, TKey>> innerKeySelector, Expression<Func<TOuter, TInner, TResult>> resultSelector)
Parameters
Type Name Description
IEnumerable<TOuter> outer

The first collection to join.

IIndexedSource<TInner> inner

The second collection to join.

Expression<Func<TOuter, TKey>> outerKeySelector

A function to extract the join key from each element of the first collection.

Expression<Func<TInner, TKey>> innerKeySelector

A function to extract the join key from each element of the second collection.

Expression<Func<TOuter, TInner, TResult>> resultSelector

A function to create a result element from two matching elements.

Returns
Type Description
IIndexedSource<TResult>

An IIndexedSource<TResult> that has elements of type TResult that are obtained by performing an inner join on two collections.

Type Parameters
Name Description
TOuter

The type of the elements of the first collection.

TInner

The type of the elements of the second collection.

TKey

The type of the keys returned by the key selector functions.

TResult

The type of the result elements.

Join<TOuter, TInner, TKey, TResult>(IIndexedSource<TOuter>, IIndexedSource<TInner>, Expression<Func<TOuter, TKey>>, Expression<Func<TInner, TKey>>, Expression<Func<TOuter, TInner, TResult>>)

Correlates the elements of two collections based on matching keys.

Declaration
public static IIndexedSource<TResult> Join<TOuter, TInner, TKey, TResult>(this IIndexedSource<TOuter> outer, IIndexedSource<TInner> inner, Expression<Func<TOuter, TKey>> outerKeySelector, Expression<Func<TInner, TKey>> innerKeySelector, Expression<Func<TOuter, TInner, TResult>> resultSelector)
Parameters
Type Name Description
IIndexedSource<TOuter> outer

The first collection to join.

IIndexedSource<TInner> inner

The second collection to join.

Expression<Func<TOuter, TKey>> outerKeySelector

A function to extract the join key from each element of the first collection.

Expression<Func<TInner, TKey>> innerKeySelector

A function to extract the join key from each element of the second collection.

Expression<Func<TOuter, TInner, TResult>> resultSelector

A function to create a result element from two matching elements.

Returns
Type Description
IIndexedSource<TResult>

An IIndexedSource<TResult> that has elements of type TResult that are obtained by performing an inner join on two collections.

Type Parameters
Name Description
TOuter

The type of the elements of the first collection.

TInner

The type of the elements of the second collection.

TKey

The type of the keys returned by the key selector functions.

TResult

The type of the result elements.