Edit

Share via


DbExpressionBuilder.Lambda Method

Definition

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

Overloads

Lambda(DbExpression, IEnumerable<DbVariableReferenceExpression>)

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

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.

public:
 static System::Data::Common::CommandTrees::DbLambda ^ Lambda(System::Data::Common::CommandTrees::DbExpression ^ body, System::Collections::Generic::IEnumerable<System::Data::Common::CommandTrees::DbVariableReferenceExpression ^> ^ variables);
public static System.Data.Common.CommandTrees.DbLambda Lambda (System.Data.Common.CommandTrees.DbExpression body, System.Collections.Generic.IEnumerable<System.Data.Common.CommandTrees.DbVariableReferenceExpression> variables);
static member Lambda : System.Data.Common.CommandTrees.DbExpression * seq<System.Data.Common.CommandTrees.DbVariableReferenceExpression> -> System.Data.Common.CommandTrees.DbLambda
Public Function Lambda (body As DbExpression, variables As IEnumerable(Of DbVariableReferenceExpression)) As DbLambda

Parameters

body
DbExpression

An expression that defines the logic of the Lambda function.

variables
IEnumerable<DbVariableReferenceExpression>

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

Returns

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

Exceptions

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

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

Applies to

Lambda(DbExpression, DbVariableReferenceExpression[])

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

public:
 static System::Data::Common::CommandTrees::DbLambda ^ Lambda(System::Data::Common::CommandTrees::DbExpression ^ body, ... cli::array <System::Data::Common::CommandTrees::DbVariableReferenceExpression ^> ^ variables);
public static System.Data.Common.CommandTrees.DbLambda Lambda (System.Data.Common.CommandTrees.DbExpression body, params System.Data.Common.CommandTrees.DbVariableReferenceExpression[] variables);
static member Lambda : System.Data.Common.CommandTrees.DbExpression * System.Data.Common.CommandTrees.DbVariableReferenceExpression[] -> System.Data.Common.CommandTrees.DbLambda
Public Function Lambda (body As DbExpression, ParamArray variables As DbVariableReferenceExpression()) As DbLambda

Parameters

body
DbExpression

An expression that defines the logic of the Lambda function.

variables
DbVariableReferenceExpression[]

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

Returns

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

Exceptions

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

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

Applies to