共用方式為


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

指出是否使用資料批註來指定組態。

傳回

設定的擁有權。

適用於