SqlServerOnDeleteConvention Class

Definition

A convention that configures the OnDelete behavior for foreign keys on the join entity type for self-referencing skip navigations

public class SqlServerOnDeleteConvention : Microsoft.EntityFrameworkCore.Metadata.Conventions.CascadeDeleteConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.ISkipNavigationForeignKeyChangedConvention
public class SqlServerOnDeleteConvention : Microsoft.EntityFrameworkCore.Metadata.Conventions.CascadeDeleteConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IEntityTypeAnnotationChangedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.ISkipNavigationForeignKeyChangedConvention
type SqlServerOnDeleteConvention = class
    inherit CascadeDeleteConvention
    interface ISkipNavigationForeignKeyChangedConvention
    interface IConvention
type SqlServerOnDeleteConvention = class
    inherit CascadeDeleteConvention
    interface ISkipNavigationForeignKeyChangedConvention
    interface IConvention
    interface IEntityTypeAnnotationChangedConvention
Public Class SqlServerOnDeleteConvention
Inherits CascadeDeleteConvention
Implements ISkipNavigationForeignKeyChangedConvention
Public Class SqlServerOnDeleteConvention
Inherits CascadeDeleteConvention
Implements IEntityTypeAnnotationChangedConvention, ISkipNavigationForeignKeyChangedConvention
Inheritance
SqlServerOnDeleteConvention
Implements

Remarks

See Model building conventions, and Accessing SQL Server and Azure SQL databases with EF Core for more information and examples.

Constructors

SqlServerOnDeleteConvention(ProviderConventionSetBuilderDependencies, RelationalConventionSetBuilderDependencies)

Creates a new instance of SqlServerOnDeleteConvention.

Properties

Dependencies

Dependencies for this service.

(Inherited from CascadeDeleteConvention)
RelationalDependencies

Relational provider-specific dependencies for this service.

Methods

GetTargetDeleteBehavior(IConventionForeignKey)

Returns the delete behavior to set for the given foreign key.

ProcessEntityTypeAnnotationChanged(IConventionEntityTypeBuilder, String, IConventionAnnotation, IConventionAnnotation, IConventionContext<IConventionAnnotation>)

Called after an annotation is changed on an entity type.

ProcessForeignKeyAdded(IConventionForeignKeyBuilder, IConventionContext<IConventionForeignKeyBuilder>)

Called after a foreign key is added to the entity type.

(Inherited from CascadeDeleteConvention)
ProcessForeignKeyAdded(IConventionRelationshipBuilder, IConventionContext<IConventionRelationshipBuilder>)

Called after a foreign key is added to the entity type.

(Inherited from CascadeDeleteConvention)
ProcessForeignKeyRequirednessChanged(IConventionForeignKeyBuilder, IConventionContext<Nullable<Boolean>>)

Called after the requiredness for a foreign key is changed.

(Inherited from CascadeDeleteConvention)
ProcessForeignKeyRequirednessChanged(IConventionRelationshipBuilder, IConventionContext<IConventionRelationshipBuilder>)

Called after the requiredness for a foreign key is changed.

(Inherited from CascadeDeleteConvention)
ProcessSkipNavigationForeignKeyChanged(IConventionSkipNavigationBuilder, IConventionForeignKey, IConventionForeignKey, IConventionContext<IConventionForeignKey>)

Called after a skip navigation inverse is changed.

Applies to