Partager via


RuntimeEntityType.AddNavigation Méthode

Définition

Surcharges

AddNavigation(String, RuntimeForeignKey, Boolean, Type, PropertyInfo, FieldInfo, PropertyAccessMode, Boolean)

Ajoute une nouvelle propriété de navigation à ce type d’entité.

AddNavigation(String, RuntimeForeignKey, Boolean, Type, PropertyInfo, FieldInfo, PropertyAccessMode, Boolean, Boolean)

Ajoute une nouvelle propriété de navigation à ce type d’entité.

AddNavigation(String, RuntimeForeignKey, Boolean, Type, PropertyInfo, FieldInfo, PropertyAccessMode, Boolean)

Ajoute une nouvelle propriété de navigation à ce type d’entité.

public virtual Microsoft.EntityFrameworkCore.Metadata.RuntimeNavigation AddNavigation (string name, Microsoft.EntityFrameworkCore.Metadata.RuntimeForeignKey foreignKey, bool onDependent, Type clrType, System.Reflection.PropertyInfo? propertyInfo = default, System.Reflection.FieldInfo? fieldInfo = default, Microsoft.EntityFrameworkCore.PropertyAccessMode propertyAccessMode = Microsoft.EntityFrameworkCore.PropertyAccessMode.PreferField, bool eagerLoaded = false);
abstract member AddNavigation : string * Microsoft.EntityFrameworkCore.Metadata.RuntimeForeignKey * bool * Type * System.Reflection.PropertyInfo * System.Reflection.FieldInfo * Microsoft.EntityFrameworkCore.PropertyAccessMode * bool -> Microsoft.EntityFrameworkCore.Metadata.RuntimeNavigation
override this.AddNavigation : string * Microsoft.EntityFrameworkCore.Metadata.RuntimeForeignKey * bool * Type * System.Reflection.PropertyInfo * System.Reflection.FieldInfo * Microsoft.EntityFrameworkCore.PropertyAccessMode * bool -> Microsoft.EntityFrameworkCore.Metadata.RuntimeNavigation
Public Overridable Function AddNavigation (name As String, foreignKey As RuntimeForeignKey, onDependent As Boolean, clrType As Type, Optional propertyInfo As PropertyInfo = Nothing, Optional fieldInfo As FieldInfo = Nothing, Optional propertyAccessMode As PropertyAccessMode = Microsoft.EntityFrameworkCore.PropertyAccessMode.PreferField, Optional eagerLoaded As Boolean = false) As RuntimeNavigation

Paramètres

name
String

Nom de la propriété de navigation skip à ajouter.

foreignKey
RuntimeForeignKey

Clé étrangère qui définit la relation que cette propriété de navigation naviguera.

onDependent
Boolean

Valeur indiquant si la propriété de navigation est définie du côté dépendant de la clé étrangère sous-jacente.

clrType
Type

Type de valeur que contient cette navigation.

propertyInfo
PropertyInfo

Propriété CLR correspondante ou null pour une navigation fantôme.

fieldInfo
FieldInfo

Champ CLR correspondant ou null pour une navigation d’ombre.

propertyAccessMode
PropertyAccessMode

PropertyAccessMode utilisé pour cette navigation.

eagerLoaded
Boolean

Valeur indiquant si cette navigation doit être chargée avec ardeur par défaut.

Retours

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

S’applique à

AddNavigation(String, RuntimeForeignKey, Boolean, Type, PropertyInfo, FieldInfo, PropertyAccessMode, Boolean, Boolean)

Ajoute une nouvelle propriété de navigation à ce type d’entité.

public virtual Microsoft.EntityFrameworkCore.Metadata.RuntimeNavigation AddNavigation (string name, Microsoft.EntityFrameworkCore.Metadata.RuntimeForeignKey foreignKey, bool onDependent, Type clrType, System.Reflection.PropertyInfo? propertyInfo = default, System.Reflection.FieldInfo? fieldInfo = default, Microsoft.EntityFrameworkCore.PropertyAccessMode propertyAccessMode = Microsoft.EntityFrameworkCore.PropertyAccessMode.PreferField, bool eagerLoaded = false, bool lazyLoadingEnabled = true);
abstract member AddNavigation : string * Microsoft.EntityFrameworkCore.Metadata.RuntimeForeignKey * bool * Type * System.Reflection.PropertyInfo * System.Reflection.FieldInfo * Microsoft.EntityFrameworkCore.PropertyAccessMode * bool * bool -> Microsoft.EntityFrameworkCore.Metadata.RuntimeNavigation
override this.AddNavigation : string * Microsoft.EntityFrameworkCore.Metadata.RuntimeForeignKey * bool * Type * System.Reflection.PropertyInfo * System.Reflection.FieldInfo * Microsoft.EntityFrameworkCore.PropertyAccessMode * bool * bool -> Microsoft.EntityFrameworkCore.Metadata.RuntimeNavigation
Public Overridable Function AddNavigation (name As String, foreignKey As RuntimeForeignKey, onDependent As Boolean, clrType As Type, Optional propertyInfo As PropertyInfo = Nothing, Optional fieldInfo As FieldInfo = Nothing, Optional propertyAccessMode As PropertyAccessMode = Microsoft.EntityFrameworkCore.PropertyAccessMode.PreferField, Optional eagerLoaded As Boolean = false, Optional lazyLoadingEnabled As Boolean = true) As RuntimeNavigation

Paramètres

name
String

Nom de la propriété de navigation à ajouter.

foreignKey
RuntimeForeignKey

Clé étrangère qui définit la relation que cette propriété de navigation naviguera.

onDependent
Boolean

Valeur indiquant si la propriété de navigation est définie du côté dépendant de la clé étrangère sous-jacente.

clrType
Type

Type de valeur que contient cette navigation.

propertyInfo
PropertyInfo

Propriété CLR correspondante ou null pour une navigation fantôme.

fieldInfo
FieldInfo

Champ CLR correspondant ou null pour une navigation d’ombre.

propertyAccessMode
PropertyAccessMode

PropertyAccessMode utilisé pour cette navigation.

eagerLoaded
Boolean

Valeur indiquant si cette navigation doit être chargée avec ardeur par défaut.

lazyLoadingEnabled
Boolean

Valeur indiquant si cette navigation doit être activée pour le chargement différé.

Retours

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

S’applique à