DbExpressionBuilder.Variable(TypeUsage, String) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
建立一個新變 DbVariableReferenceExpression 數,參考一個名稱與型別指定的變數。
public:
[System::Runtime::CompilerServices::Extension]
static System::Data::Common::CommandTrees::DbVariableReferenceExpression ^ Variable(System::Data::Metadata::Edm::TypeUsage ^ type, System::String ^ name);
public static System.Data.Common.CommandTrees.DbVariableReferenceExpression Variable(this System.Data.Metadata.Edm.TypeUsage type, string name);
static member Variable : System.Data.Metadata.Edm.TypeUsage * string -> System.Data.Common.CommandTrees.DbVariableReferenceExpression
<Extension()>
Public Function Variable (type As TypeUsage, name As String) As DbVariableReferenceExpression
參數
- type
- TypeUsage
參考變數的型別。
- name
- String
參考變數的名稱。
傳回
一個 DbVariableReferenceExpression,代表對指定名稱與型別的變數的參考。 表達式的結果型態將與 相同 type。