DbExpressionBuilder.Constant Methode

Definition

Erstellt ein neues DbConstantExpression.

Überlädt

Name Beschreibung
Constant(TypeUsage, Object)

Erstellt eine neue DbConstantExpression des angegebenen Grundtyps mit dem angegebenen Konstantenwert.

Constant(Object)

Erstellt ein neues DbConstantExpression mit dem angegebenen Konstantenwert.

Constant(TypeUsage, Object)

Erstellt eine neue DbConstantExpression des angegebenen Grundtyps mit dem angegebenen Konstantenwert.

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

Parameter

constantType
TypeUsage

Der Typ des Konstantenwerts.

value
Object

Der zu darstellende Konstantenwert.

Gibt zurück

Ein neues DbConstantExpression mit dem angegebenen Wert und einem Ergebnistyp von constantType.

Ausnahmen

value oder constantType ist NULL.

value ist keine Instanz eines gültigen Konstantentyps, constantType stellt keinen Grundtyp dar oder value weist einen anderen Grundtyp auf als die durch constantType.

Gilt für:

Constant(Object)

Erstellt ein neues DbConstantExpression mit dem angegebenen Konstantenwert.

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

Parameter

value
Object

Der zu darstellende Konstantenwert.

Gibt zurück

Ein neuer DbConstantExpression mit dem angegebenen Wert.

Ausnahmen

value ist NULL.

value ist keine Instanz eines gültigen Konstantentyps.

Gilt für: