Class ForeignKey
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
stringName of foreign key.
Source
SqlObjectNameTable, that references other table.
Target
SqlObjectNameTable, 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
Relation
Ordered list of source-target pairs of columns, used by foreign key relation.
public IReadOnlyList<ForeignKeyColumnMapping> Relation { get; init; }
Property Value
Source
Table, that references other table.
public SqlObjectName Source { get; init; }
Property Value
Target
Table, referenced by foreign key.
public SqlObjectName Target { get; init; }
Property Value
Methods
ToString()
Returns a string that represents the current object.
public override string ToString()
Returns
- string
A string that represents the current object.