Share via


DbExpressionBuilder.BindAs(DbExpression, String) Method

Definition

Creates a new DbExpressionBinding that uses the specified variable name to bind the given expression

public static System.Data.Entity.Core.Common.CommandTrees.DbExpressionBinding BindAs (this System.Data.Entity.Core.Common.CommandTrees.DbExpression input, string varName);
static member BindAs : System.Data.Entity.Core.Common.CommandTrees.DbExpression * string -> System.Data.Entity.Core.Common.CommandTrees.DbExpressionBinding
<Extension()>
Public Function BindAs (input As DbExpression, varName As String) As DbExpressionBinding

Parameters

input
DbExpression

The expression to bind.

varName
String

The variable name that should be used for the binding.

Returns

A new expression binding with the specified expression and variable name.

Exceptions

input or varName is null.

input does not have a collection result.

Applies to