namespace: Serenity.Data.Mapping assembly: Serenity.Net.Data
Specifies that this property is a foreign key to another field in a primary key table.
public ForeignKeyAttribute(Type rowType)
parameter | description |
---|---|
rowType | Entity for primary key table. |
- class ForeignKeyAttribute
namespace: Serenity.Data.Mapping assembly: Serenity.Net.Data
Specifies that this property is a foreign key to another field in a primary key table.
public ForeignKeyAttribute(string table, string field)
parameter | description |
---|---|
table | Primary key table |
field | Matching column in primary key table |
- class ForeignKeyAttribute
namespace: Serenity.Data.Mapping assembly: Serenity.Net.Data
Specifies that this property is a foreign key to another field in a primary key table.
public ForeignKeyAttribute(Type rowType, string field)
parameter | description |
---|---|
rowType | Entity for primary key table. Row must have a [TableName] attribute. |
field | If field parameter is not specified, the row type must have a field with [Identity] attribute or single property with [PrimaryKey] attribute. (implementing IIdRow won't help) |
- class ForeignKeyAttribute
namespace: Serenity.Data.Mapping assembly: Serenity.Net.Data
Specifies that this property is a foreign key to another field in a primary key table.
public ForeignKeyAttribute(string table, string field, params ServerType[] serverTypes)
parameter | description |
---|---|
table | Primary key table |
field | Matching column in primary key table |
serverTypes | Dialects like MySql, Sqlite. |
- enum ServerType
- class ForeignKeyAttribute
namespace: Serenity.Data.Mapping assembly: Serenity.Net.Data
Specifies that this property is a foreign key to another field in a primary key table.
public ForeignKeyAttribute(Type rowType, string field, params ServerType[] serverTypes)
parameter | description |
---|---|
rowType | Entity for primary key table. Row must have a [TableName] attribute. |
field | If field parameter is not specified, the row type must have a field with [Identity] attribute or single property with [PrimaryKey] attribute. (implementing IIdRow won't help) |
serverTypes | Dialects like MySql, Sqlite. |
- enum ServerType
- class ForeignKeyAttribute