DbExpressionBuilder.Variable Method (TypeUsage, String)

 

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

Namespace:   System.Data.Entity.Core.Common.CommandTrees.ExpressionBuilder
Assembly:  EntityFramework (in EntityFramework.dll)

public static DbVariableReferenceExpression Variable(
	this TypeUsage type,
	string name
)

Parameters

type
Type: System.Data.Entity.Core.Metadata.Edm.TypeUsage

The type of the referenced variable.

name
Type: System.String

The name of the referenced variable.

Return Value

Type: System.Data.Entity.Core.Common.CommandTrees.DbVariableReferenceExpression

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.