IConventionForeignKey.HasDependentToPrincipal 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
HasDependentToPrincipal(String, Boolean) |
已过时.
设置指向主体实体的依赖实体类型的导航属性。 |
HasDependentToPrincipal(MemberInfo, Boolean) |
已过时.
设置指向主体实体的依赖实体类型的导航属性。 |
HasDependentToPrincipal(String, Boolean)
注意
Use SetDependentToPrincipal
设置指向主体实体的依赖实体类型的导航属性。
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
参数
- name
- String
依赖类型上的导航属性的名称。 传递 null
将导致未定义导航属性。
- fromDataAnnotation
- Boolean
指示配置是否是使用数据注释指定的。
返回
新建的导航属性。
- 属性
适用于
HasDependentToPrincipal(MemberInfo, Boolean)
注意
Use SetDependentToPrincipal
设置指向主体实体的依赖实体类型的导航属性。
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
参数
- property
- MemberInfo
依赖类型上的导航属性。 传递 null
将导致未定义导航属性。
- fromDataAnnotation
- Boolean
指示配置是否是使用数据注释指定的。
返回
新建的导航属性。
- 属性