DbExpressionBuilder.Variable(TypeUsage, String) Method

Definition

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

C#
public static System.Data.Common.CommandTrees.DbVariableReferenceExpression Variable(this System.Data.Metadata.Edm.TypeUsage type, string name);

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

Product Versions
.NET Framework 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1