IConventionForeignKey.SetDependentToPrincipal 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
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)
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)
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
Entity Framework