DbExpressionBuilder.TreatAs(DbExpression, TypeUsage) Yöntem

Tanım

Yeni bir DbTreatExpression oluşturur.

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

Parametreler

argument
DbExpression

Örneği belirten bir ifade.

treatType
TypeUsage

Farklı işleme türü için meta verileri yazın.

Döndürülenler

Belirtilen bağımsız değişken ve türe sahip yeni bir DbTreatExpression.

Özel durumlar

argument veya treatType null.

treatType , sonuç türüyle aynı tür hiyerarşisinde argumentdeğildir.

Açıklamalar

DbTreatExpression, polimorfik sonuç türüne sahip olmasını ve bu treatType türün bu sonuç türüyle aynı tür hiyerarşisinden bir tür olmasını gerektirirargument.

Şunlara uygulanır