Sdílet prostřednictvím


DbExpressionBuilder.IsOfOnly(DbExpression, TypeUsage) Metoda

Definice

Vytvoří nový DbIsOfExpression výraz, který určuje, jestli je daný argument zadaného typu, a pouze tohoto typu (nikoli podtypu).

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

Parametry

argument
DbExpression

Výraz, který určuje instanci.

type
TypeUsage

Zadejte metadata, která určují typ, se kterým by se měl porovnávat typ výsledku instance.

Návraty

Nový DbIsOfExpression se zadanou instancí a typem a DbExpressionKind IsOfOnly.

Výjimky

argument nebo type je null.

type není ve stejné hierarchii typů jako výsledný typ argument.

Poznámky

DbIsOfExpression vyžaduje polymorfní argument typ výsledku a to type je typ ze stejné hierarchie typů jako tento typ výsledku.

Platí pro