IConventionRelationshipBuilder.HasNavigations Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
HasNavigations(MemberInfo, MemberInfo, Boolean) |
Configures the given properties as the navigation properties used by this relationship. |
HasNavigations(String, String, Boolean) |
Configures the properties with the given names as the navigation properties used by this relationship. |
HasNavigations(MemberInfo, MemberInfo, Boolean)
Configures the given properties as the navigation properties used by this relationship.
public Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionRelationshipBuilder HasNavigations (System.Reflection.MemberInfo navigationToPrincipal, System.Reflection.MemberInfo navigationToDependent, bool fromDataAnnotation = false);
abstract member HasNavigations : System.Reflection.MemberInfo * System.Reflection.MemberInfo * bool -> Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionRelationshipBuilder
Public Function HasNavigations (navigationToPrincipal As MemberInfo, navigationToDependent As MemberInfo, Optional fromDataAnnotation As Boolean = false) As IConventionRelationshipBuilder
Parameters
- navigationToPrincipal
- MemberInfo
The property to use as the navigation to the principal entity type.
Can be null
.
- navigationToDependent
- MemberInfo
The property to use as the navigation to the dependent entity type.
Can be null
.
- fromDataAnnotation
- Boolean
Indicates whether the configuration was specified using a data annotation.
Returns
The same builder instance if the navigation properties were configured,
null
otherwise.
Applies to
HasNavigations(String, String, Boolean)
Configures the properties with the given names as the navigation properties used by this relationship.
public Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionRelationshipBuilder HasNavigations (string navigationToPrincipalName, string navigationToDependentName, bool fromDataAnnotation = false);
abstract member HasNavigations : string * string * bool -> Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionRelationshipBuilder
Public Function HasNavigations (navigationToPrincipalName As String, navigationToDependentName As String, Optional fromDataAnnotation As Boolean = false) As IConventionRelationshipBuilder
Parameters
- navigationToPrincipalName
- String
The name of the property to use as the navigation to the principal entity type.
Can be null
.
- navigationToDependentName
- String
The name of the property to use as the navigation to the dependent entity type.
Can be null
.
- fromDataAnnotation
- Boolean
Indicates whether the configuration was specified using a data annotation.
Returns
The same builder instance if the navigation properties were configured,
null
otherwise.
Applies to
Entity Framework