語言

DbExpressionBuilder.Constant 方法

定義

多載

名稱 Description
Constant(TypeUsage, Object)

建立 DbConstantExpression 一個指定原始型態的新 ,且其值為給定常數。

Constant(Object)

建立 DbConstantExpression 一個以給定常數值的新值。

Constant(TypeUsage, Object)

建立 DbConstantExpression 一個指定原始型態的新 ,且其值為給定常數。

public static System.Data.Entity.Core.Common.CommandTrees.DbConstantExpression Constant(this System.Data.Entity.Core.Metadata.Edm.TypeUsage constantType, object value);
static member Constant : System.Data.Entity.Core.Metadata.Edm.TypeUsage * obj -> System.Data.Entity.Core.Common.CommandTrees.DbConstantExpression
<Extension()>
Public Function Constant (constantType As TypeUsage, value As Object) As DbConstantExpression

參數

constantType
TypeUsage

常數值的類型。

value
Object

代表的恆定價值。

傳回

一個新的 DbConstantExpression,包含給定值,且結果型別為 constantType。

例外狀況

value 或 constantType 為 null。

value 不是有效常數型別的實例,constantType 不代表原始型別,或值屬於與 constantType 所表示的不同原始型別。

適用於

Constant(Object)

建立 DbConstantExpression 一個以給定常數值的新值。

public static System.Data.Entity.Core.Common.CommandTrees.DbConstantExpression Constant(object value);
static member Constant : obj -> System.Data.Entity.Core.Common.CommandTrees.DbConstantExpression
Public Function Constant (value As Object) As DbConstantExpression

參數

value
Object

代表的恆定價值。

傳回

一個新的 DbConstantExpression,給定值。

例外狀況

值為空。

value 並非有效常數型態的實例。

適用於