Join Method (DbExpression, DbExpression, Func(DbExpression, DbExpression), Func(DbExpression, DbExpression))

DbExpressionBuilder.Join Method (DbExpression, DbExpression, Func<DbExpression, DbExpression>, Func<DbExpression, DbExpression>)

.NET Framework (current version)
 

Creates a new DbJoinExpression that joins the sets specified by the outer and inner expressions, on an equality condition between the specified outer and inner keys, using InnerJoin as the DbExpressionKind.

Namespace:   System.Data.Common.CommandTrees.ExpressionBuilder
Assembly:  System.Data.Entity (in System.Data.Entity.dll)

public static DbJoinExpression Join(
	this DbExpression outer,
	DbExpression inner,
	Func<DbExpression, DbExpression> outerKey,
	Func<DbExpression, DbExpression> innerKey
)

Parameters

outer
Type: System.Data.Common.CommandTrees.DbExpression

A DbExpression that specifies the outer set argument.

inner
Type: System.Data.Common.CommandTrees.DbExpression

A DbExpression that specifies the inner set argument.

outerKey
Type: System.Func<DbExpression, DbExpression>

A method that specifies how the outer key value should be derived from an element of the outer set.

innerKey
Type: System.Func<DbExpression, DbExpression>

A method that specifies how the inner key value should be derived from an element of the inner set.

Return Value

Type: System.Data.Common.CommandTrees.DbJoinExpression

A new DbJoinExpression, with an DbExpressionKind of InnerJoin, that represents the inner join operation applied to the left and right input sets under a join condition that compares the outer and inner key values for equality.

Exception Condition
ArgumentNullException

outer, inner, outerKey or innerKey is null.

ArgumentException

outer or inner does not have a collection result type.

ArgumentNullException

The expression produced by outerKey or innerKey is null.

ArgumentException

The expressions produced by outerKey and innerKey are not comparable for equality.

.NET Framework
Available since 4.5
Return to top
Show:
© 2016 Microsoft