Share via


IForeignKeyConstraint Interface

Definition

Represents a foreign key constraint.

public interface IForeignKeyConstraint : Microsoft.EntityFrameworkCore.Infrastructure.IAnnotatable
type IForeignKeyConstraint = interface
    interface IAnnotatable
type IForeignKeyConstraint = interface
    interface IAnnotatable
    interface IReadOnlyAnnotatable
Public Interface IForeignKeyConstraint
Implements IAnnotatable
Implements

Remarks

See Modeling entity types and relationships for more information and examples.

Properties

Columns

Gets the columns that are participating in the foreign key constraint.

Item[String]

Gets the value of the annotation with the given name, returning null if it does not exist.

(Inherited from IReadOnlyAnnotatable)
MappedForeignKeys

Gets the mapped foreign keys.

Name

Gets the name of the foreign key constraint.

OnDeleteAction

Gets the action to be performed when the referenced row is deleted.

PrincipalColumns

Gets the columns that are referenced by the foreign key constraint.

PrincipalTable

Gets the table that is referenced by the foreign key constraint.

PrincipalUniqueConstraint

Gets the unique constraint on the columns referenced by the foreign key constraint.

Table

Gets the table on with the foreign key constraint is declared.

Methods

AddRuntimeAnnotation(String, Object)

Adds a runtime annotation to this object. Throws if an annotation with the specified name already exists.

(Inherited from IAnnotatable)
AnnotationsToDebugString(Int32)

Gets the debug string for all annotations declared on the object.

(Inherited from IReadOnlyAnnotatable)
FindAnnotation(String)

Gets the annotation with the given name, returning null if it does not exist.

(Inherited from IReadOnlyAnnotatable)
FindRuntimeAnnotation(String)

Gets the runtime annotation with the given name, returning null if it does not exist.

(Inherited from IAnnotatable)
FindRuntimeAnnotationValue(String)

Gets the value of the runtime annotation with the given name, returning null if it does not exist.

(Inherited from IAnnotatable)
GetAnnotation(String)

Gets the annotation with the given name, throwing if it does not exist.

(Inherited from IReadOnlyAnnotatable)
GetAnnotations()

Gets all annotations on the current object.

(Inherited from IReadOnlyAnnotatable)
GetOrAddRuntimeAnnotationValue<TValue,TArg>(String, Func<TArg,TValue>, TArg)

Gets the value of the runtime annotation with the given name, adding it if one does not exist.

(Inherited from IAnnotatable)
GetRuntimeAnnotations()

Gets all the runtime annotations on the current object.

(Inherited from IAnnotatable)
RemoveRuntimeAnnotation(String)

Removes the given runtime annotation from this object.

(Inherited from IAnnotatable)
SetRuntimeAnnotation(String, Object)

Sets the runtime annotation stored under the given key. Overwrites the existing annotation if an annotation with the specified name already exists.

(Inherited from IAnnotatable)
ToDebugString(MetadataDebugStringOptions, Int32)

Creates a human-readable representation of the given metadata.

Warning: Do not rely on the format of the returned string. It is designed for debugging only and may change arbitrarily between releases.

Extension Methods

AnnotationsToDebugString(IAnnotatable, Int32)

Gets the debug string for all annotations declared on the object.

GetAnnotation(IAnnotatable, String)

Gets the annotation with the given name, throwing if it does not exist.

ToDebugString(IForeignKeyConstraint, MetadataDebugStringOptions, Int32)

Creates a human-readable representation of the given metadata.

Warning: Do not rely on the format of the returned string. It is designed for debugging only and may change arbitrarily between releases.

Applies to