Share via


IConventionRelationshipBuilder.HasNavigation Method

Definition

Overloads

HasNavigation(MemberInfo, Boolean, Boolean)

Configures the given property as a navigation property used by this relationship.

HasNavigation(String, Boolean, Boolean)

Configures the property with the given name as a navigation property used by this relationship.

HasNavigation(MemberInfo, Boolean, Boolean)

Configures the given property as a navigation property used by this relationship.

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

Parameters

property
MemberInfo

The property to use.

pointsToPrincipal
Boolean

A value indicating whether the navigation is on the dependent type pointing to the principal type.

fromDataAnnotation
Boolean

Indicates whether the configuration was specified using a data annotation.

Returns

The same builder instance if the navigation property was configured, null otherwise.

Applies to

HasNavigation(String, Boolean, Boolean)

Configures the property with the given name as a navigation property used by this relationship.

public Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionRelationshipBuilder HasNavigation (string name, bool pointsToPrincipal, bool fromDataAnnotation = false);
abstract member HasNavigation : string * bool * bool -> Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionRelationshipBuilder
Public Function HasNavigation (name As String, pointsToPrincipal As Boolean, Optional fromDataAnnotation As Boolean = false) As IConventionRelationshipBuilder

Parameters

name
String

The name of the property to use.

pointsToPrincipal
Boolean

A value indicating whether the navigation is on the dependent type pointing to the principal type.

fromDataAnnotation
Boolean

Indicates whether the configuration was specified using a data annotation.

Returns

The same builder instance if the navigation property was configured, null otherwise.

Applies to