Share via


DbExpressionBuilder.Constant メソッド

定義

新しい DbConstantExpression を作成します。

オーバーロード

Constant(TypeUsage, Object)

指定された定数値を使用して、指定されたプリミティブ型の新しい DbConstantExpression 式を作成します。

Constant(Object)

指定した定数値を使用して新しい DbConstantExpression を作成します。

Constant(TypeUsage, Object)

指定された定数値を使用して、指定されたプリミティブ型の新しい DbConstantExpression 式を作成します。

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

パラメーター

constantType
TypeUsage

定数値の型。

value
Object

表現する定数値。

戻り値

特定の値と constantType の結果型を持つ新しい DbConstantExpression。

例外

value または constantType が null です。

value は有効な定数型のインスタンスではないか、 constantType プリミティブ型を表さないか value 、 で constantType表されるプリミティブ型とは異なるプリミティブ型です。

適用対象

Constant(Object)

指定した定数値を使用して新しい DbConstantExpression を作成します。

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

パラメーター

value
Object

表現する定数値。

戻り値

特定の値を持つ新しい DbConstantExpression。

例外

value が null です。

value が有効な定数の型のインスタンスではありません。

適用対象