ForeignKeyAttribute class

namespace: Serenity.Data.Mapping   assemblySerenity.Net.Data

Specifies that this property is a foreign key to another field in a primary key table. There is no need for foreign key to exist in database actually. It is not checked. This is mostly used for joins.

[AttributeUsage(AttributeTargets.All)]
public class ForeignKeyAttribute : Attribute

Public Members

name description
ForeignKeyAttribute(…) Specifies that this property is a foreign key to another field in a primary key table. (2 constructors)
Field { get; } Gets the field.
RowType { get; set; } Gets or sets the type of the row.
Table { get; } Gets the table.

See Also