Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you create a visual model of EntityFramework code first

If you look here you will notice that this guy is showing the Entity Model Diagrams, I would like to know how I can create an Entity Model Diagram from my EntityFramework code first classes.

It just gets frustrating trying to remember how everything links together just by looking at the code.

like image 520
Callum Linington Avatar asked Sep 06 '13 12:09

Callum Linington


People also ask

How do I create a model code in Visual Studio?

Creating a data model from sample JSON. To generate the data model select the view > Command Palette > Paste JSON as Code. You will be prompted to enter a name for the model class. Once you enter a class name, (Person) the JSON from you clipboard is converted to a data model for dart. Since you named the file with a .

How do you create a code first approach?

Step 1 − First, create the console application from File → New → Project… Step 2 − Select Windows from the left pane and Console Application from the template pane. Step 3 − Enter EFCodeFirstDemo as the name and select OK. Step 4 − Right-click on your project in the solution explorer and select Manage NuGet Packages…

How do I create a view using EF code First poco?

You cannot create a view from EF Code First ,you should add the script in the 'seed' script to pre populate the view .


1 Answers

With the Entity Frameworks Power Tools installed you can right-click the context in your solution view, click on "Entity Framework", then select "View Entity Data Model".

This will create a neat diagram from your classes.

like image 52
Dennis Traub Avatar answered Sep 28 '22 22:09

Dennis Traub