Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot drag tables from Server Explorer to .edmx designer pane

Why can't I drag tables from the Server Explorer to the .edmx designer pane? I've done this before in the exact same steps and it worked, but since yesterday instead of getting the classic + sign for dropping items, I get the no entry symbol (circle with slash in the middle).

What am I doing wrong? As I said, I've done this before but now it doesn't let me drag things. alt text

like image 959
Sergio Tapia Avatar asked Aug 15 '10 15:08

Sergio Tapia


2 Answers

Please don't take this the wrong way but are you absolutely sure :)? Linq to SQL supports drag-and-drop via the Server Explorer but as far as I'm aware the only way to do this sort of thing in Entity Framework is by choosing the "Update Model from Database..." context menu option and picking your tables from the list.

I'm assuming here that you're using Entity Framework based on your saying ".edmx" (Linq to SQL uses the .dbml format).

like image 84
Isaac Abraham Avatar answered Nov 14 '22 15:11

Isaac Abraham


Seems too late but may be this help somebody:

Ensure that the table you're trying to drag has Primary Key defined!

This is how I ended up getting tables in diagram.

like image 25
Sunny Sharma Avatar answered Nov 14 '22 15:11

Sunny Sharma