Export (0) Print
Expand All

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

.NET Framework 4.6 and 4.5

Creates a new DbJoinExpression that joins the sets specified by the left and right expressions, on the specified join condition, using InnerJoin as the DbExpressionKind.

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

public static DbJoinExpression InnerJoin(
	this DbExpression left,
	DbExpression right,
	Func<DbExpression, DbExpression, DbExpression> joinCondition


Type: System.Data.Common.CommandTrees.DbExpression

A DbExpression that specifies the left set argument.

Type: System.Data.Common.CommandTrees.DbExpression

A DbExpression that specifies the right set argument.

Type: System.Func<DbExpression, DbExpression, DbExpression>

A method representing the condition on which to join. This method must produce an expression with a Boolean result type that provides the logic of the join condition.

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 the given join condition.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type DbExpression. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).


left, right or joinCondition is null.


left or right does not have a collection result type.


The expression produced by joinCondition is null.


The expression produced by joinCondition does not have a Boolean result type.

.NET Framework

Supported in: 4.6, 4.5
© 2015 Microsoft