共用方式為


ReferenceCollectionBuilder<TPrincipalEntity,TDependentEntity>.OnDelete 方法

定義

多載

OnDelete(DeleteBehavior)

在刪除主體或中斷關聯性時,設定套用至關聯性中相依實體的作業。

OnDelete(DeleteBehavior)

設定刪除主體或中斷關聯性時,刪除作業如何套用至關聯性中的相依實體。

OnDelete(DeleteBehavior)

在刪除主體或中斷關聯性時,設定套用至關聯性中相依實體的作業。

public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.ReferenceCollectionBuilder<TPrincipalEntity,TDependentEntity> OnDelete (Microsoft.EntityFrameworkCore.DeleteBehavior deleteBehavior);
override this.OnDelete : Microsoft.EntityFrameworkCore.DeleteBehavior -> Microsoft.EntityFrameworkCore.Metadata.Builders.ReferenceCollectionBuilder<'PrincipalEntity, 'DependentEntity (requires 'PrincipalEntity : null and 'DependentEntity : null)>
Public Overridable Function OnDelete (deleteBehavior As DeleteBehavior) As ReferenceCollectionBuilder(Of TPrincipalEntity, TDependentEntity)

參數

deleteBehavior
DeleteBehavior

要執行的動作。

傳回

相同的產生器實例,以便鏈結多個組態呼叫。

適用於

OnDelete(DeleteBehavior)

設定刪除主體或中斷關聯性時,刪除作業如何套用至關聯性中的相依實體。

public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.ReferenceCollectionBuilder<TPrincipalEntity,TDependentEntity> OnDelete (Microsoft.EntityFrameworkCore.Metadata.DeleteBehavior deleteBehavior);
override this.OnDelete : Microsoft.EntityFrameworkCore.Metadata.DeleteBehavior -> Microsoft.EntityFrameworkCore.Metadata.Builders.ReferenceCollectionBuilder<'PrincipalEntity, 'DependentEntity (requires 'PrincipalEntity : null and 'DependentEntity : null)>
Public Overridable Function OnDelete (deleteBehavior As DeleteBehavior) As ReferenceCollectionBuilder(Of TPrincipalEntity, TDependentEntity)

參數

deleteBehavior
DeleteBehavior

要執行的動作。

傳回

相同的產生器實例,以便鏈結多個組態呼叫。

適用於