Manually add foreign key to entities model
There are times when the developer might just want to add a foreign key to entity model directly without regenerate everything from database. In order to do that follow the steps below.
· Reclick on the empty area of the entity designer. Select Add New then choose Associations…
Figure 3.13 Add Association
· Select the entities for examle select Order and OrderDetail entities. One order can have multiple items. So choose 1 (One) multiplicity for Order entity and choose * (Many) multiplicity for OrderDetail entity. Check Navigation Property and Add foreign key properties to the ‘OrderDetail’ Entity.
Figure 3.13 Select keys to associate