DbExpressionBuilder.CastTo(DbExpression, TypeUsage) Metodo

Definizione

Crea un nuovo DbCastExpression oggetto che applica un'operazione cast a un argomento polimorfico.

public:
[System::Runtime::CompilerServices::Extension]
 static System::Data::Common::CommandTrees::DbCastExpression ^ CastTo(System::Data::Common::CommandTrees::DbExpression ^ argument, System::Data::Metadata::Edm::TypeUsage ^ toType);
public static System.Data.Common.CommandTrees.DbCastExpression CastTo(this System.Data.Common.CommandTrees.DbExpression argument, System.Data.Metadata.Edm.TypeUsage toType);
static member CastTo : System.Data.Common.CommandTrees.DbExpression * System.Data.Metadata.Edm.TypeUsage -> System.Data.Common.CommandTrees.DbCastExpression
<Extension()>
Public Function CastTo (argument As DbExpression, toType As TypeUsage) As DbCastExpression

Parametri

argument
DbExpression

Argomento al quale deve essere applicato il cast.

toType
TypeUsage

Metadati di tipo che specifica il tipo a cui eseguire il cast.

Valori restituiti

Nuovo DbCastExpression con l'argomento e il tipo di destinazione specificati.

Eccezioni

argument o toType è null.

Il cast specificato non è valido.

Si applica a