DbExpressionBuilder.TreatAs(DbExpression, TypeUsage) Metoda
Definice
Důležité
Některé informace platí pro předběžně vydaný produkt, který se může zásadně změnit, než ho výrobce nebo autor vydá. Microsoft neposkytuje žádné záruky, výslovné ani předpokládané, týkající se zde uváděných informací.
Vytvoří nový objekt DbTreatExpression.
public static System.Data.Entity.Core.Common.CommandTrees.DbTreatExpression TreatAs(this System.Data.Entity.Core.Common.CommandTrees.DbExpression argument, System.Data.Entity.Core.Metadata.Edm.TypeUsage treatType);
static member TreatAs : System.Data.Entity.Core.Common.CommandTrees.DbExpression * System.Data.Entity.Core.Metadata.Edm.TypeUsage -> System.Data.Entity.Core.Common.CommandTrees.DbTreatExpression
<Extension()>
Public Function TreatAs (argument As DbExpression, treatType As TypeUsage) As DbTreatExpression
Parametry
- argument
- DbExpression
Výraz, který určuje instanci.
- treatType
- TypeUsage
Zadejte metadata pro typ treat-as.
Návraty
Nový DbTreatExpression se zadaným argumentem a typem.
Výjimky
argument nebo treatType má hodnotu null.
treatType není ve stejné hierarchii typů jako výsledek typu argumentu.