Share via


DbExpressionBuilder.Variable(TypeUsage, String) Method

Definition

Creates a new DbVariableReferenceExpression that references a variable with the specified name and type.

public static System.Data.Entity.Core.Common.CommandTrees.DbVariableReferenceExpression Variable (this System.Data.Entity.Core.Metadata.Edm.TypeUsage type, string name);
static member Variable : System.Data.Entity.Core.Metadata.Edm.TypeUsage * string -> System.Data.Entity.Core.Common.CommandTrees.DbVariableReferenceExpression
<Extension()>
Public Function Variable (type As TypeUsage, name As String) As DbVariableReferenceExpression

Parameters

type
TypeUsage

The type of the referenced variable.

name
String

The name of the referenced variable.

Returns

A DbVariableReferenceExpression that represents a reference to a variable with the specified name and type. The result type of the expression will be the same as type.

Applies to