IConventionForeignKey.SetDeleteBehavior Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Sets a value indicating how a delete operation is applied to dependent entities in the relationship when the principal is deleted or the relationship is severed.
public void SetDeleteBehavior (Microsoft.EntityFrameworkCore.DeleteBehavior? deleteBehavior, bool fromDataAnnotation = false);
public Microsoft.EntityFrameworkCore.DeleteBehavior? SetDeleteBehavior (Microsoft.EntityFrameworkCore.DeleteBehavior? deleteBehavior, bool fromDataAnnotation = false);
abstract member SetDeleteBehavior : Nullable<Microsoft.EntityFrameworkCore.DeleteBehavior> * bool -> unit
abstract member SetDeleteBehavior : Nullable<Microsoft.EntityFrameworkCore.DeleteBehavior> * bool -> Nullable<Microsoft.EntityFrameworkCore.DeleteBehavior>
Public Sub SetDeleteBehavior (deleteBehavior As Nullable(Of DeleteBehavior), Optional fromDataAnnotation As Boolean = false)
Public Function SetDeleteBehavior (deleteBehavior As Nullable(Of DeleteBehavior), Optional fromDataAnnotation As Boolean = false) As Nullable(Of DeleteBehavior)
Parameters
- deleteBehavior
- Nullable<DeleteBehavior>
A value indicating how a delete operation is applied to dependent entities in the relationship when the principal is deleted or the relationship is severed.
- fromDataAnnotation
- Boolean
Indicates whether the configuration was specified using a data annotation.
Returns
The configured behavior.
Applies to
Entity Framework