ReferenceCollectionBuilder.OnDelete Method

Definition

Overloads

OnDelete(DeleteBehavior)

Configures the operation applied to dependent entities in the relationship when the principal is deleted or the relationship is severed.

OnDelete(DeleteBehavior)

Configures how a delete operation is applied to dependent entities in the relationship when the principal is deleted or the relationship is severed.

OnDelete(DeleteBehavior)

Source:
ReferenceCollectionBuilder.cs
Source:
ReferenceCollectionBuilder.cs
Source:
ReferenceCollectionBuilder.cs
Source:
ReferenceCollectionBuilder.cs
Source:
ReferenceCollectionBuilder.cs
Source:
ReferenceCollectionBuilder.cs
Source:
ReferenceCollectionBuilder.cs
Source:
ReferenceCollectionBuilder.cs
Source:
ReferenceCollectionBuilder.cs

Configures the operation applied to dependent entities in the relationship when the principal is deleted or the relationship is severed.

public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.ReferenceCollectionBuilder OnDelete (Microsoft.EntityFrameworkCore.DeleteBehavior deleteBehavior);

Parameters

deleteBehavior
DeleteBehavior

The action to perform.

Returns

The same builder instance so that multiple configuration calls can be chained.

Applies to

Entity Framework Core 9.0 and other versions
Product Versions
Entity Framework Core 2.0, 2.1, 2.2, 3.0, 3.1, 5.0, 6.0, 7.0, 8.0, 9.0

OnDelete(DeleteBehavior)

Configures how a delete operation is applied to dependent entities in the relationship when the principal is deleted or the relationship is severed.

public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.ReferenceCollectionBuilder OnDelete (Microsoft.EntityFrameworkCore.Metadata.DeleteBehavior deleteBehavior);

Parameters

deleteBehavior
DeleteBehavior

The action to perform.

Returns

The same builder instance so that multiple configuration calls can be chained.

Applies to

Entity Framework Core 1.1 and Entity Framework Core 1.0
Product Versions
Entity Framework Core 1.0, 1.1