Partager via


IConventionRelationshipBuilder.HasEntityTypes Méthode

Définition

Configure les types d’entités qui participent à cette relation. En appelant cette méthode, les types principal et dépendant peuvent être basculés ou la relation peut être déplacée vers un type de base de l’un des types d’entités participants.

public Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionRelationshipBuilder HasEntityTypes (Microsoft.EntityFrameworkCore.Metadata.IConventionEntityType principalEntityType, Microsoft.EntityFrameworkCore.Metadata.IConventionEntityType dependentEntityType, bool fromDataAnnotation = false);
abstract member HasEntityTypes : Microsoft.EntityFrameworkCore.Metadata.IConventionEntityType * Microsoft.EntityFrameworkCore.Metadata.IConventionEntityType * bool -> Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionRelationshipBuilder
Public Function HasEntityTypes (principalEntityType As IConventionEntityType, dependentEntityType As IConventionEntityType, Optional fromDataAnnotation As Boolean = false) As IConventionRelationshipBuilder

Paramètres

principalEntityType
IConventionEntityType

Type d’entité principale à définir.

dependentEntityType
IConventionEntityType

Type d’entité dépendante à définir.

fromDataAnnotation
Boolean

Indique si la configuration a été spécifiée à l’aide d’une annotation de données.

Retours

Un générateur instance si les types d’entités ont été configurés comme étant liés, null sinon.

S’applique à