A very newbie question about MVC and Entity Framework (using data driven development).
I built an EF model off an existing database. I used the EF wizard/tool in Visual Studio, pointed it to my database, and it created all the entity classes and relationships.
Assume it is simple database that has two tables and following columns:
Table 1
uid (pk)
name
description
Table 2
id (pk)
uid (fk to Table 1)
class
I want a view/page that will display Table 2 but instead of uid, display name from Table 1.
Right now, my controller just passes the Table2 entity model to the view but obviously, it doesnt contain the cross reference value for uid.
Do I need to create a separate view model for this? If so, what do i put in it? Or, can I extend the EF generated entity model to somehow contain the associated values from Table1?