IConventionForeignKey.SetPrincipalToDependent 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
SetPrincipalToDependent(MemberInfo, Boolean) |
Sets the navigation property on the principal entity type that points to the dependent entity. |
SetPrincipalToDependent(String, Boolean) |
Sets the navigation property on the principal entity type that points to the dependent entity. |
SetPrincipalToDependent(MemberInfo, Boolean)
Sets the navigation property on the principal entity type that points to the dependent entity.
public Microsoft.EntityFrameworkCore.Metadata.IConventionNavigation SetPrincipalToDependent (System.Reflection.MemberInfo property, bool fromDataAnnotation = false);
public Microsoft.EntityFrameworkCore.Metadata.IConventionNavigation? SetPrincipalToDependent (System.Reflection.MemberInfo? property, bool fromDataAnnotation = false);
abstract member SetPrincipalToDependent : System.Reflection.MemberInfo * bool -> Microsoft.EntityFrameworkCore.Metadata.IConventionNavigation
Public Function SetPrincipalToDependent (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.
Applies to
SetPrincipalToDependent(String, Boolean)
Sets the navigation property on the principal entity type that points to the dependent entity.
public Microsoft.EntityFrameworkCore.Metadata.IConventionNavigation SetPrincipalToDependent (string name, bool fromDataAnnotation = false);
public Microsoft.EntityFrameworkCore.Metadata.IConventionNavigation? SetPrincipalToDependent (string? name, bool fromDataAnnotation = false);
abstract member SetPrincipalToDependent : string * bool -> Microsoft.EntityFrameworkCore.Metadata.IConventionNavigation
Public Function SetPrincipalToDependent (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.
Applies to
Entity Framework