Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

DbExpressionBuilder.CrossApply Method (DbExpression, Func<DbExpression, KeyValuePair<String, DbExpression>>)

.NET Framework 4.6 and 4.5

Creates a new DbApplyExpression that evaluates the given apply expression once for each element of a given input set, producing a collection of rows with corresponding input and apply columns. Rows for which apply evaluates to an empty set are not included.

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

public static DbApplyExpression CrossApply(
	this DbExpression source,
	Func<DbExpression, KeyValuePair<string, DbExpression>> apply
)

Parameters

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

A DbExpression that specifies the input set.

apply
Type: System.Func<DbExpression, KeyValuePair<String, DbExpression>>

A method that specifies the logic to evaluate once for each member of the input set.

Return Value

Type: System.Data.Common.CommandTrees.DbApplyExpression
An new DbApplyExpression with the specified input and apply bindings and an DbExpressionKind of CrossApply.

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).

ExceptionCondition
ArgumentNullException

source or apply is null.

ArgumentException

source does not have a collection result type.

ArgumentNullException

The result of apply contains a name or expression that is null.

ArgumentException

The result of apply contains a name or expression that is not valid in an expression binding.

.NET Framework

Supported in: 4.6, 4.5
Show:
© 2015 Microsoft