Creating entity diagrams from the first classes of code

I just read the Asp.net MVC3 tutorials (Models (data))

On this page, a 4 out of 10 tutorial on an ASP.NET website shows that an entity diagram is created from the first classes of code. How do I generate them?

+6
source share
4 answers

Assuming your schema was created from Code First classes, you can translate db to edmx to render the model. Any classes created from this will obviously not be associated with your Code First classes.

+3
source

This can be done very easily using the Class Diagram . Add New Item> Class Diagram. Then drag your first class of code into the diagram from the solution explorer.

+5
source

The class diagram is fine, but it does not automatically show the relationship between the classes. The weakest way I've used is the Entity Framework Power Tools . Their tool description:

By right-clicking on a C # project, the following context menu function is supported: 1) First engineer reverse code - generates POCO classes, DbContext and Code First derivatives for an existing database.

+4
source

Create a copy of your project. Open a copy and add a new Entity Data / ADO.NET data model. Edit the chart for the layout and print the .pdf file. Delete a copy of the project.

Anytime you make changes, you will have to re-create the chart and edit the layout, but I can usually go through the whole process in about 15 minutes.

0
source

Source: https://habr.com/ru/post/886644/


All Articles