IConventionForeignKey.HasDependentToPrincipal 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
HasDependentToPrincipal(String, Boolean) |
Obsolete.
Sets the navigation property on the dependent entity type that points to the principal entity. |
HasDependentToPrincipal(MemberInfo, Boolean) |
Obsolete.
Sets the navigation property on the dependent entity type that points to the principal entity. |
HasDependentToPrincipal(String, Boolean)
Caution
Use SetDependentToPrincipal
Sets the navigation property on the dependent entity type that points to the principal entity.
public Microsoft.EntityFrameworkCore.Metadata.IConventionNavigation HasDependentToPrincipal (string name, bool fromDataAnnotation = false);
[System.Obsolete("Use SetDependentToPrincipal")]
public virtual Microsoft.EntityFrameworkCore.Metadata.IConventionNavigation HasDependentToPrincipal (string name, bool fromDataAnnotation = false);
[System.Obsolete("Use SetDependentToPrincipal")]
public virtual Microsoft.EntityFrameworkCore.Metadata.IConventionNavigation? HasDependentToPrincipal (string? name, bool fromDataAnnotation = false);
abstract member HasDependentToPrincipal : string * bool -> Microsoft.EntityFrameworkCore.Metadata.IConventionNavigation
[<System.Obsolete("Use SetDependentToPrincipal")>]
abstract member HasDependentToPrincipal : string * bool -> Microsoft.EntityFrameworkCore.Metadata.IConventionNavigation
override this.HasDependentToPrincipal : string * bool -> Microsoft.EntityFrameworkCore.Metadata.IConventionNavigation
Public Function HasDependentToPrincipal (name As String, Optional fromDataAnnotation As Boolean = false) As IConventionNavigation
Public Overridable Function HasDependentToPrincipal (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.
- Attributes
Applies to
HasDependentToPrincipal(MemberInfo, Boolean)
Caution
Use SetDependentToPrincipal
Sets the navigation property on the dependent entity type that points to the principal entity.
public Microsoft.EntityFrameworkCore.Metadata.IConventionNavigation HasDependentToPrincipal (System.Reflection.MemberInfo property, bool fromDataAnnotation = false);
[System.Obsolete("Use SetDependentToPrincipal")]
public virtual Microsoft.EntityFrameworkCore.Metadata.IConventionNavigation HasDependentToPrincipal (System.Reflection.MemberInfo property, bool fromDataAnnotation = false);
[System.Obsolete("Use SetDependentToPrincipal")]
public virtual Microsoft.EntityFrameworkCore.Metadata.IConventionNavigation? HasDependentToPrincipal (System.Reflection.MemberInfo? property, bool fromDataAnnotation = false);
abstract member HasDependentToPrincipal : System.Reflection.MemberInfo * bool -> Microsoft.EntityFrameworkCore.Metadata.IConventionNavigation
[<System.Obsolete("Use SetDependentToPrincipal")>]
abstract member HasDependentToPrincipal : System.Reflection.MemberInfo * bool -> Microsoft.EntityFrameworkCore.Metadata.IConventionNavigation
override this.HasDependentToPrincipal : System.Reflection.MemberInfo * bool -> Microsoft.EntityFrameworkCore.Metadata.IConventionNavigation
Public Function HasDependentToPrincipal (property As MemberInfo, Optional fromDataAnnotation As Boolean = false) As IConventionNavigation
Public Overridable Function HasDependentToPrincipal (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.
- Attributes
Applies to
Entity Framework