How to add foreign key relationship in Entity Framework?

According to Relationships/Associations with the EF Designer, the steps to create a foreign key association are:

  1. Right-click an empty area of the design surface, point to Add New, and select Association….
  2. Fill in the settings for the association in the Add Association dialog.

…being sure to check the Add foreign key properties to the Entity checkbox when filling in the relationship details.

See also: Relationships, Navigation Properties, and Foreign Keys

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)