📜 ⬆️ ⬇️

Creating multiple diagrams based on a single Entity Framework model in Visual Studio 2012

This is the long-awaited functionality that has long been waiting for any developers or companies that use the Entity Framework visual model with a variety of entities.

Imagine a data model that has hundreds of entities. Working with a model diagram for at least 200 entities can be very difficult, work can be slow, and such a diagram is not very manageable.


')
But now, with the advent of Entity Framework 5.0 and Visual Studio 2012 , you can have many separate diagrams of the same data model. And it is even cooler than a new opportunity to paint different entities in different colors.

For an example, take a look at the model above, in it I select several different entities (related to customers), after which I call the option “Mode to new diagram” using the right mouse button.

As you can see now, a small diagram appears at my hand, showing me only those entities that belong to customers. I called this diagram CRM.



You can create different charts using simple COPY / PASTE, so that any entity can be displayed on any of the data model diagrams.

It should be noted that both diagrams are essentially representations (VIEW) of the same data model, which contains all the existing entities.

This model (* .edmx) can now contain many diagrams. And this is a very convenient way to visually separate different areas of large and complex data models.

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


All Articles