Table of Contents

Class ForeignKeyAttribute

Namespace
Typhon.Schema.Definition
Assembly
Typhon.Schema.Definition.dll

Declares a component field as a foreign key referencing another component type, enabling FK validation and cascade-on-delete behavior (see OnParentDelete).

[AttributeUsage(AttributeTargets.Field)]
public sealed class ForeignKeyAttribute : Attribute
Inheritance
ForeignKeyAttribute
Inherited Members

Constructors

ForeignKeyAttribute(Type)

Declares a foreign key referencing targetComponentType.

public ForeignKeyAttribute(Type targetComponentType)

Parameters

targetComponentType Type

The referenced component type (see TargetComponentType).

Exceptions

ArgumentNullException

targetComponentType is null.

Properties

TargetComponentType

The component type this foreign key references.

public Type TargetComponentType { get; }

Property Value

Type