Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Adding foreign key in visual studio 2012

I'm developing my first MVC project in Visual Studio 2012. Because i prefer "database first" approach i've started to design database. The question is: Why when i want to add foreign key i have all key properties disabled to edit (left):

enter image description here

I can only modify script directly (right) but is this really only solution? Or i did something wrong?

Thanks for any help.

like image 703
Kamil Będkowski Avatar asked Nov 21 '12 10:11

Kamil Będkowski


1 Answers

All you need to to do is right click on the foreign key options on the right side of the table view and select add new foreign key. Then in T-SQL window you need to manually edit the the foreign key and foreign key table.

like image 107
Atul Chaudhary Avatar answered Nov 15 '22 07:11

Atul Chaudhary