|
This customization displays a foreign key in a table as multiple columns from the
foreign key table.
Example:
In the Northwind database, there is an Orders table containing a CustomerId field
that points to the Customer table. In this example, when you apply this code customization,
you need to select the following values for the four variables:
Table With Foreign Key: Orders
Foreign Key: Orders.CustomerId
The above two variables refer to the table that contains the foreign key -- Orders
in this example -- not the table that we are referring to.
The next two variables refer to the table/field that contains the fields that you
want to display - in this example this would be the Customers table and the two
fields from that table.
First Display Column: Customers.ContactName
Second Display Column: Customers.CompanyName
The foreign key will be displayed as a combination of the two columns. You will
need to apply this code customization to all tables that have a foreign key that
you would like to change. In this example, any other reference to CustomerId in
another table will not be changed to the two columns unless you apply the code customization
for that table as well.
This customization will be added in:
..\<Application Name>\App_Code\Business Layer\<Table Name>Table.cs
For example: C:\MyApp1\App_Code\Business Layer\OrdersTable.cs
|