DbExpressionBuilder.Lambda Method
Creates a DbLambda with the specified inline Lambda function implementation and formal parameters.
Assembly: EntityFramework (in EntityFramework.dll)
Name | Description | |
---|---|---|
![]() ![]() | Lambda(DbExpression, DbVariableReferenceExpression[]) | Creates a DbLambda with the specified inline Lambda function implementation and formal parameters. |
![]() ![]() | Lambda(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.DbLambdaA 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.DbLambdaA 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. |