Table of Contents

Class ForeignKey

Namespace
LinqToDB.Schema
Assembly
linq2db.Tools.dll

Describes foreign key relation between tables.

public sealed record ForeignKey : IEquatable<ForeignKey>
Inheritance
ForeignKey
Implements
Extension Methods

Constructors

ForeignKey(string, SqlObjectName, SqlObjectName, IReadOnlyList<ForeignKeyColumnMapping>)

Describes foreign key relation between tables.

public ForeignKey(string Name, SqlObjectName Source, SqlObjectName Target, IReadOnlyList<ForeignKeyColumnMapping> Relation)

Parameters

Name string

Name of foreign key.

Source SqlObjectName

Table, that references other table.

Target SqlObjectName

Table, referenced by foreign key.

Relation IReadOnlyList<ForeignKeyColumnMapping>

Ordered list of source-target pairs of columns, used by foreign key relation.

Properties

Name

Name of foreign key.

public string Name { get; init; }

Property Value

string

Relation

Ordered list of source-target pairs of columns, used by foreign key relation.

public IReadOnlyList<ForeignKeyColumnMapping> Relation { get; init; }

Property Value

IReadOnlyList<ForeignKeyColumnMapping>

Source

Table, that references other table.

public SqlObjectName Source { get; init; }

Property Value

SqlObjectName

Target

Table, referenced by foreign key.

public SqlObjectName Target { get; init; }

Property Value

SqlObjectName

Methods

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.