Share via


IConventionForeignKey.HasPrincipalToDependent Method

Definition

Overloads

HasPrincipalToDependent(MemberInfo, Boolean)
Obsolete.

Sets the navigation property on the principal entity type that points to the dependent entity.

HasPrincipalToDependent(String, Boolean)
Obsolete.

Sets the navigation property on the principal entity type that points to the dependent entity.

HasPrincipalToDependent(MemberInfo, Boolean)

Source:
IConventionForeignKey.cs
Source:
IConventionForeignKey.cs

Caution

Use SetPrincipalToDependent

Sets the navigation property on the principal entity type that points to the dependent entity.

public Microsoft.EntityFrameworkCore.Metadata.IConventionNavigation HasPrincipalToDependent (System.Reflection.MemberInfo property, bool fromDataAnnotation = false);
[System.Obsolete("Use SetPrincipalToDependent")]
public virtual Microsoft.EntityFrameworkCore.Metadata.IConventionNavigation HasPrincipalToDependent (System.Reflection.MemberInfo property, bool fromDataAnnotation = false);
[System.Obsolete("Use SetPrincipalToDependent")]
public virtual Microsoft.EntityFrameworkCore.Metadata.IConventionNavigation? HasPrincipalToDependent (System.Reflection.MemberInfo? property, bool fromDataAnnotation = false);
abstract member HasPrincipalToDependent : System.Reflection.MemberInfo * bool -> Microsoft.EntityFrameworkCore.Metadata.IConventionNavigation
[<System.Obsolete("Use SetPrincipalToDependent")>]
abstract member HasPrincipalToDependent : System.Reflection.MemberInfo * bool -> Microsoft.EntityFrameworkCore.Metadata.IConventionNavigation
override this.HasPrincipalToDependent : System.Reflection.MemberInfo * bool -> Microsoft.EntityFrameworkCore.Metadata.IConventionNavigation
Public Function HasPrincipalToDependent (property As MemberInfo, Optional fromDataAnnotation As Boolean = false) As IConventionNavigation
Public Overridable Function HasPrincipalToDependent (property As MemberInfo, Optional fromDataAnnotation As Boolean = false) As IConventionNavigation

Parameters

property
MemberInfo

The name of the navigation property on the principal type. Passing null will result in there being no navigation property defined.

fromDataAnnotation
Boolean

Indicates whether the configuration was specified using a data annotation.

Returns

The newly created navigation property.

Attributes

Applies to

HasPrincipalToDependent(String, Boolean)

Source:
IConventionForeignKey.cs
Source:
IConventionForeignKey.cs

Caution

Use SetPrincipalToDependent

Sets the navigation property on the principal entity type that points to the dependent entity.

public Microsoft.EntityFrameworkCore.Metadata.IConventionNavigation HasPrincipalToDependent (string name, bool fromDataAnnotation = false);
[System.Obsolete("Use SetPrincipalToDependent")]
public virtual Microsoft.EntityFrameworkCore.Metadata.IConventionNavigation HasPrincipalToDependent (string name, bool fromDataAnnotation = false);
[System.Obsolete("Use SetPrincipalToDependent")]
public virtual Microsoft.EntityFrameworkCore.Metadata.IConventionNavigation? HasPrincipalToDependent (string? name, bool fromDataAnnotation = false);
abstract member HasPrincipalToDependent : string * bool -> Microsoft.EntityFrameworkCore.Metadata.IConventionNavigation
[<System.Obsolete("Use SetPrincipalToDependent")>]
abstract member HasPrincipalToDependent : string * bool -> Microsoft.EntityFrameworkCore.Metadata.IConventionNavigation
override this.HasPrincipalToDependent : string * bool -> Microsoft.EntityFrameworkCore.Metadata.IConventionNavigation
Public Function HasPrincipalToDependent (name As String, Optional fromDataAnnotation As Boolean = false) As IConventionNavigation
Public Overridable Function HasPrincipalToDependent (name As String, Optional fromDataAnnotation As Boolean = false) As IConventionNavigation

Parameters

name
String

The name of the navigation property on the principal type. Passing null will result in there being no navigation property defined.

fromDataAnnotation
Boolean

Indicates whether the configuration was specified using a data annotation.

Returns

The newly created navigation property.

Attributes

Applies to