Share via


IConventionForeignKeyBuilder.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)

Source:
IConventionForeignKeyBuilder.cs
Source:
IConventionForeignKeyBuilder.cs
Source:
IConventionForeignKeyBuilder.cs

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

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

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)

Source:
IConventionForeignKeyBuilder.cs
Source:
IConventionForeignKeyBuilder.cs
Source:
IConventionForeignKeyBuilder.cs

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

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

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