DbExpressionBuilder.TreatAs(DbExpression, TypeUsage) Method
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Creates a new DbTreatExpression.
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
- argument
- DbExpression
An expression that specifies the instance.
- treatType
- TypeUsage
Type metadata for the treat-as type.
A new DbTreatExpression with the specified argument and type.
argument
or treatType
is null.
treatType
is not in the same type hierarchy as the result type of argument
.
DbTreatExpression requires that argument
has a polymorphic result type, and that treatType
is a type from the same type hierarchy as that result type.
Продукт | Версии |
---|---|
.NET Framework | 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
Обратна връзка за .NET
.NET е проект с отворен код. Изберете връзка, за да предоставите обратна връзка: