IConventionForeignKey.SetIsOwnership(Nullable<Boolean>, Boolean) 方法

定义

设置一个值,该值指示此关系是否定义所有权。 如果 true为 ,则必须始终通过主体实体的导航访问依赖实体。

public void SetIsOwnership (bool? ownership, bool fromDataAnnotation = false);
public bool? SetIsOwnership (bool? ownership, bool fromDataAnnotation = false);
abstract member SetIsOwnership : Nullable<bool> * bool -> unit
abstract member SetIsOwnership : Nullable<bool> * bool -> Nullable<bool>
Public Sub SetIsOwnership (ownership As Nullable(Of Boolean), Optional fromDataAnnotation As Boolean = false)
Public Function SetIsOwnership (ownership As Nullable(Of Boolean), Optional fromDataAnnotation As Boolean = false) As Nullable(Of Boolean)

参数

ownership
Nullable<Boolean>

一个 值,该值指示此关系是否定义所有权。

fromDataAnnotation
Boolean

指示配置是否是使用数据注释指定的。

返回

配置的所有权。

适用于