Because some of the child table's fields are foreign keys to the parent table, only one key value is displayed under normal conditions.
such as the highlight column, if so shown, is indeed unfriendly.
If you are creating or editing a mode, we can use the drop-down menu to solve, such as "html.dropdownlistfor Exercise (2)" http://www.cnblogs.com/insus/p/3383277.html. But in the display, we can write a function to implement a friendly name display, but this practice, in MVC, is really a performance difference. What is to be done, then, a more eclectic approach?
Insus.net solution, is to get the sub-table data, do a multi-table association, you can refer to the "MVC 5 display, creation, editing, deletion and other functions practice" http://www.cnblogs.com/insus/p/3372916.html The first table function and a stored procedure are:
After associating the multiple tables, the foreign and foreign key values are displayed directly [Fruitcategory_nbr],[categoryname].
Then modify the FruitKind.cs class under models to add a property:
Finally, in the place where the view is displayed, after modifying the line comment out, add the # # line code.
OK, let's do the demo in real Time: