語言

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,代表對指定名稱與型別的變數的參考。 表達式的結果型態與型別相同。

適用於