DbExpressionBuilder.TreatAs(DbExpression, TypeUsage) Yöntem

Tanım

Yeni DbTreatExpressionbir 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ı davran 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 değeridir.

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

Açıklamalar

DbTreatExpression, çok biçimli sonuç türüne sahip olmasını gerektirir argument ve bu, bu treatType sonuç türüyle aynı tür hiyerarşisinden bir türdür.

Şunlara uygulanır