IConventionForeignKey.HasDependentToPrincipal Méthode

Définition

Surcharges

HasDependentToPrincipal(String, Boolean)
Obsolète.

Définit la propriété de navigation sur le type d’entité dépendant qui pointe vers l’entité principale.

HasDependentToPrincipal(MemberInfo, Boolean)
Obsolète.

Définit la propriété de navigation sur le type d’entité dépendant qui pointe vers l’entité principale.

HasDependentToPrincipal(String, Boolean)

Source:
IConventionForeignKey.cs
Source:
IConventionForeignKey.cs

Attention

Use SetDependentToPrincipal

Définit la propriété de navigation sur le type d’entité dépendant qui pointe vers l’entité principale.

C#
public Microsoft.EntityFrameworkCore.Metadata.IConventionNavigation HasDependentToPrincipal (string name, bool fromDataAnnotation = false);
C#
[System.Obsolete("Use SetDependentToPrincipal")]
public virtual Microsoft.EntityFrameworkCore.Metadata.IConventionNavigation HasDependentToPrincipal (string name, bool fromDataAnnotation = false);
C#
[System.Obsolete("Use SetDependentToPrincipal")]
public virtual Microsoft.EntityFrameworkCore.Metadata.IConventionNavigation? HasDependentToPrincipal (string? name, bool fromDataAnnotation = false);

Paramètres

name
String

Nom de la propriété de navigation sur le type dépendant. Le passage null entraîne l’absence de propriété de navigation définie.

fromDataAnnotation
Boolean

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

Retours

Propriété de navigation nouvellement créée.

Attributs

S’applique à

Entity Framework Core 6.0 et autres versions
Produit Versions (Obsolète)
Entity Framework Core 3.0, 3.1 (5.0, 6.0)

HasDependentToPrincipal(MemberInfo, Boolean)

Source:
IConventionForeignKey.cs
Source:
IConventionForeignKey.cs

Attention

Use SetDependentToPrincipal

Définit la propriété de navigation sur le type d’entité dépendant qui pointe vers l’entité principale.

C#
public Microsoft.EntityFrameworkCore.Metadata.IConventionNavigation HasDependentToPrincipal (System.Reflection.MemberInfo property, bool fromDataAnnotation = false);
C#
[System.Obsolete("Use SetDependentToPrincipal")]
public virtual Microsoft.EntityFrameworkCore.Metadata.IConventionNavigation HasDependentToPrincipal (System.Reflection.MemberInfo property, bool fromDataAnnotation = false);
C#
[System.Obsolete("Use SetDependentToPrincipal")]
public virtual Microsoft.EntityFrameworkCore.Metadata.IConventionNavigation? HasDependentToPrincipal (System.Reflection.MemberInfo? property, bool fromDataAnnotation = false);

Paramètres

property
MemberInfo

Propriété de navigation sur le type dépendant. Le passage null entraîne l’absence de propriété de navigation définie.

fromDataAnnotation
Boolean

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

Retours

Propriété de navigation nouvellement créée.

Attributs

S’applique à

Entity Framework Core 6.0 et autres versions
Produit Versions (Obsolète)
Entity Framework Core 3.0, 3.1 (5.0, 6.0)