How to view database diagram in a Code First using localdb

database diagram entity-framework relationship visual-studio-2012

Question

I have a Code First project with Entity Framework 5.0.0 using localdb created in Visual Studio 2012 Ultimate. Although I can see my class relations in a Class Diagram, how to see a visual diagram of automatic generated database by EF ?

1
31
11/24/2012 8:41:45 PM

Accepted Answer

Install Entity Framework Power Tools Beta 4, restart Visual Studio, right-click on the context in your solution view and you'll see a new 'Entity Framework' option in the context menu. Select 'View Entity Data Model' to see a beautiful visual database diagram in Visual Studio. Voilà!

Entity Framework 6 Power Tools: Link

40
9/30/2019 10:51:03 AM

Popular Answer

You can use Microsoft SQL Server Management Studio 2012 with localdb which supports Database Diagrams in they way you may be used to with other SQL Server database.

  1. Open Management Studio (should have been installed with Visual Studio)
  2. Connect to (localdb)\v11.0, with Windows Authentication
  3. Find the relevant database
  4. Expand Database Digrams, and install diagram support objects if you've not already
  5. Add the tables you need and you're done!

Source: This older but still relevant article: http://visualstudiomagazine.com/blogs/data-driver/2012/05/visual-studio-11-beta-easier-development-localdb.aspx



Related Questions





Related

Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow