Skip to content

TQueryLinqExtensions_Join_8FHZDXWvf+MVHzF7O8PxZw

Jacob Spitzer edited this page Aug 28, 2022 · 2 revisions

TQueryLinqExtensions.Join<TOuter,TInner,TKey,TResult>(DbEc<TOuter>, DbEc<TInner>, Expression<Func<TOuter,TKey>>, Expression<Func<TInner,TKey>>, Expression<Func<TOuter,TInner,TResult>>, JoinType) Method

Correlates the records of two TQuery recordsets based on matching keys.

public static DbEasyConnect.DbEc<TResult> Join<TOuter,TInner,TKey,TResult>(this DbEasyConnect.DbEc<TOuter> outer, DbEasyConnect.DbEc<TInner> inner, System.Linq.Expressions.Expression<System.Func<TOuter,TKey>> outerKeySelector, System.Linq.Expressions.Expression<System.Func<TInner,TKey>> innerKeySelector, System.Linq.Expressions.Expression<System.Func<TOuter,TInner,TResult>> resultSelector, DbEasyConnect.JoinType joinType=DbEasyConnect.JoinType.InnerJoin);

Type parameters

TOuter
The table type of the records of the first table.

TInner
The table type of the records of the second/joined table.

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

TResult
The type of the result records.

Parameters

outer DbEasyConnect.DbEc<TOuter>
The first DbEc<T> TQuery recordset to join.

inner DbEasyConnect.DbEc<TInner>
The second DbEc<T> TQuery recordset to join to the first TQuery recordset.

outerKeySelector System.Linq.Expressions.Expression<System.Func<TOuter,TKey>>
A function to extract the join key from each record of the first recordset.

innerKeySelector System.Linq.Expressions.Expression<System.Func<TInner,TKey>>
A function to extract the join key from each record of the second recordset.

resultSelector System.Linq.Expressions.Expression<System.Func<TOuter,TInner,TResult>>
A function to create a result record from two joined table records.

joinType JoinType
A join type selected by the DbEasyConnect.JoinType enum. Available options: InnerJoin, LeftJoin, RightJoin, FullJoin. If no option is selected, The default will be InnerJoin.

Returns

DbEasyConnect.DbEc<TResult>
An DbEc<T> that has records of type TResult obtained by performing an inner join on two TQuery recordsets.

Clone this wiki locally