DbExpressionBuilder.Lambda Method

 

Creates a DbLambda with the specified inline Lambda function implementation and formal parameters.

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

NameDescription
System_CAPS_pubmethodSystem_CAPS_staticLambda(DbExpression, DbVariableReferenceExpression[])

Creates a DbLambda with the specified inline Lambda function implementation and formal parameters.

System_CAPS_pubmethodSystem_CAPS_staticLambda(DbExpression, IEnumerable<DbVariableReferenceExpression>)

Creates a DbLambda with the specified inline Lambda function implementation and formal parameters.


DbExpressionBuilder.Lambda Method (DbExpression, DbVariableReferenceExpression[])

Creates a DbLambda with the specified inline Lambda function implementation and formal parameters.

public static DbLambda Lambda(
	DbExpression body,
	params DbVariableReferenceExpression[] variables
)

Parameters

body
Type: System.Data.Entity.Core.Common.CommandTrees.DbExpression

An expression that defines the logic of the Lambda function.

variables
Type: System.Data.Entity.Core.Common.CommandTrees.DbVariableReferenceExpression[]

A DbVariableReferenceExpression collection that represents the formal parameters to the Lambda function. These variables are valid for use in thebodyexpression.

Return Value

Type: System.Data.Entity.Core.Common.CommandTrees.DbLambda

A new DbLambda that describes an inline Lambda function with the specified body and formal parameters.

Exception Condition
ArgumentNullException

variables is null or contains null, or body is null.

ArgumentException

variables contains more than one element with the same variable name.


DbExpressionBuilder.Lambda Method (DbExpression, IEnumerable<DbVariableReferenceExpression>)

Creates a DbLambda with the specified inline Lambda function implementation and formal parameters.

public static DbLambda Lambda(
	DbExpression body,
	IEnumerable<DbVariableReferenceExpression> variables
)

Parameters

body
Type: System.Data.Entity.Core.Common.CommandTrees.DbExpression

An expression that defines the logic of the Lambda function.

variables
Type: System.Collections.Generic.IEnumerable<DbVariableReferenceExpression>

A DbVariableReferenceExpression collection that represents the formal parameters to the Lambda function. These variables are valid for use in the body expression.

Return Value

Type: System.Data.Entity.Core.Common.CommandTrees.DbLambda

A new DbLambda that describes an inline Lambda function with the specified body and formal parameters.

Exception Condition
ArgumentNullException

variables is null or contains null, or body is null.

ArgumentException

variables contains more than one element with the same variable name.