How do I find a specific table in my EDMX model quickly?
Asked Answered
F

5

113

I was wondering if anyone knows a quicker way to find a table in the EDMX model than just scrolling through the diagram and looking for the thing. Our database has around 50 tables in it and when I'm looking for a specific one it's just a chore to see where VS put the thing.

I'm using VS 2010 for the purpose of this question.

Thank you in advance.

Franklynfrankness answered 4/10, 2012 at 20:20 Comment(2)
Edit: Thank you for your quick answers. marc_s, I know yours was first, but it took me a while to figure out what you meant. Bob Horn's answer was more complete with all the steps involved clearly laid out. I appreciate the time from all three of you.Franklynfrankness
Btw, sometimes it is necessary to find something quickly in .edmx using XML Editor. Would be nice all the xml would always be sorted inside .edmx file: visualstudio.uservoice.com/forums/121579-visual-studio/…Aneto
D
193

Click in an open area of the designer:

enter image description here

Go to the Properties tab:

enter image description here

In the dropdown box at the top, select your table. You should then see it highlighted in the designer.

enter image description here

Duiker answered 4/10, 2012 at 20:24 Comment(3)
Doesn't work for me in VS2015 professional. Clicking on the empty area only shows a single entry in the "Property" window, which is the ConceptualEntityModel.Subtemperate
Nevermind, turns out this method doesn't work on *.edmx files.Subtemperate
If you change the Fill color on the properties once you select the table, you can see it much easier on the table view.Crossover
R
62

In main menu select View > Other Windows > Entity Data Model Browser (it usually opens in the same panel as Solution explorer).

You can navigate the tree list or type the table in text box.

Entity data model browser

Ruck answered 4/10, 2012 at 20:25 Comment(0)
R
14

If you go to the Properties window in Visual Studio 2010, you'll see an alphabetically sorted list of entity types (e.g. your tables) in your EDMX - pick the one you're interested in, and the visual designer should realign itself to actually show that table in view:

enter image description here

Rutland answered 4/10, 2012 at 20:23 Comment(1)
As of VS 2017 this no longer works on DB-first edmx.Profit
E
13

In the "model browser" you can right click the Table and choose "Show in diagram" in the context menu

Elva answered 26/6, 2014 at 13:52 Comment(1)
+1 For some reason my EDMX is a little broken, The diagram shows fine, but the properties drop down does not show any entities. This method works great.Hewet
H
10
  1. Right click on ampty place of Designer view
  2. Select "Model browser" enter image description here

3)Select talbe form menu -> it will be selected in designer:

enter image description here

Haywoodhayyim answered 3/7, 2020 at 7:51 Comment(1)
Perfect answer!Quickel

© 2022 - 2024 — McMap. All rights reserved.