语言

DbExpressionBuilder.Variable(TypeUsage, String) 方法

定义

创建一个引用具有指定名称和类型的变量的新 DbVariableReferenceExpression 变量。

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

参数

type
TypeUsage

引用的变量的类型。

name
String

引用的变量的名称。

返回

一个 DbVariableReferenceExpression,表示对具有指定名称和类型的变量的引用。 表达式的结果类型将与类型相同。

适用于