Dela via


IConventionForeignKey.SetDependentToPrincipal Method

Definition

Overloads

SetDependentToPrincipal(MemberInfo, Boolean)

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

SetDependentToPrincipal(String, Boolean)

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

SetDependentToPrincipal(MemberInfo, Boolean)

Source:
IConventionForeignKey.cs
Source:
IConventionForeignKey.cs
Source:
IConventionForeignKey.cs
Source:
IConventionForeignKey.cs
Source:
IConventionForeignKey.cs

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

public Microsoft.EntityFrameworkCore.Metadata.IConventionNavigation SetDependentToPrincipal (System.Reflection.MemberInfo property, bool fromDataAnnotation = false);
public Microsoft.EntityFrameworkCore.Metadata.IConventionNavigation? SetDependentToPrincipal (System.Reflection.MemberInfo? property, bool fromDataAnnotation = false);
abstract member SetDependentToPrincipal : System.Reflection.MemberInfo * bool -> Microsoft.EntityFrameworkCore.Metadata.IConventionNavigation
Public Function SetDependentToPrincipal (property As MemberInfo, Optional fromDataAnnotation As Boolean = false) As IConventionNavigation

Parameters

property
MemberInfo

The navigation property on the dependent 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.

Applies to

SetDependentToPrincipal(String, Boolean)

Source:
IConventionForeignKey.cs
Source:
IConventionForeignKey.cs
Source:
IConventionForeignKey.cs
Source:
IConventionForeignKey.cs
Source:
IConventionForeignKey.cs

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

public Microsoft.EntityFrameworkCore.Metadata.IConventionNavigation SetDependentToPrincipal (string name, bool fromDataAnnotation = false);
public Microsoft.EntityFrameworkCore.Metadata.IConventionNavigation? SetDependentToPrincipal (string? name, bool fromDataAnnotation = false);
abstract member SetDependentToPrincipal : string * bool -> Microsoft.EntityFrameworkCore.Metadata.IConventionNavigation
Public Function SetDependentToPrincipal (name As String, Optional fromDataAnnotation As Boolean = false) As IConventionNavigation

Parameters

name
String

The name of the navigation property on the dependent 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.

Applies to