IForeignKey IForeignKey Interface

Definition

Represents a relationship where a foreign key property(s) in a dependent entity type reference a corresponding primary or alternate key in a principal entity type.

public interface IForeignKey : IAnnotatable
Public Interface IForeignKey
    Inherits IAnnotatable

Properties

DeclaringEntityType DeclaringEntityType

Gets the dependent entity type. This may be different from the type that Properties are defined on when the relationship is defined a derived type in an inheritance hierarchy (since the properties may be defined on a base type).

IEntityType DeclaringEntityType { get; }
ReadOnly Property DeclaringEntityType As IEntityType

DeleteBehavior DeleteBehavior

Gets 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.

DeleteBehavior DeleteBehavior { get; }
ReadOnly Property DeleteBehavior As DeleteBehavior

DependentToPrincipal DependentToPrincipal

Gets the navigation property on the dependent entity type that points to the principal entity.

INavigation DependentToPrincipal { get; }
ReadOnly Property DependentToPrincipal As INavigation

IsRequired IsRequired

Gets a value indicating if this relationship is required. If true, the dependent entity must always be assigned to a valid principal entity.

bool IsRequired { get; }
ReadOnly Property IsRequired As Boolean
Value
System.Boolean System.Boolean

IsUnique IsUnique

Gets a value indicating whether the values assigned to the foreign key properties are unique.

bool IsUnique { get; }
ReadOnly Property IsUnique As Boolean
Value
System.Boolean System.Boolean

Item[String] Item(String)

Inherited from IAnnotatable

PrincipalEntityType PrincipalEntityType

Gets the principal entity type that this relationship targets. This may be different from the type that PrincipalKey is defined on when the relationship targets a derived type in an inheritance hierarchy (since the key is defined on the base type of the hierarchy).

IEntityType PrincipalEntityType { get; }
ReadOnly Property PrincipalEntityType As IEntityType

PrincipalKey PrincipalKey

Gets the primary or alternate key that the relationship targets.

IKey PrincipalKey { get; }
ReadOnly Property PrincipalKey As IKey
Value
IKey IKey

PrincipalToDependent PrincipalToDependent

Gets the navigation property on the principal entity type that points to the dependent entity.

INavigation PrincipalToDependent { get; }
ReadOnly Property PrincipalToDependent As INavigation

Properties Properties

Gets the foreign key properties in the dependent entity.

IReadOnlyList<IProperty> Properties { get; }
ReadOnly Property Properties As IReadOnlyList(Of IProperty)
Value
System.Collections.Generic.IReadOnlyList<IProperty> System.Collections.Generic.IReadOnlyList(Of IProperty)

Methods

FindAnnotation(String) FindAnnotation(String)

Inherited from IAnnotatable

GetAnnotations() GetAnnotations()

Inherited from IAnnotatable