Entity Framework Tutorial Basics (in): Multiple diagrams

Source: Internet
Author: User

Multiple diagrams in Entity Framework 5.0

Visual Studio provides a facility to split the design time visual representation of the Entity Data Model. This means can has multiple diagrams for one Entity Data Model.

You can create a new diagram in multiple ways:

    1. Add a new diagram and drag and drop entities from Model Browser
    2. Move entities from the existing diagram to a new diagram
1. Add a new diagram and drag and drop entities from Model Browser:

You can add a new diagram by right clicking on the diagrams node of the the Model browser and selecting ' Add New Diagram ':

You can rename the diagram, for Example:studentdiagram to include all student related entities:

Now, you can drag and drop Student and studentaddress entities to this new diagram:

2. Move entities from existing diagram to new diagram:

You can also move entities from an existing diagram to a new diagram. For example, if want to move Teacher and Course entities to a new diagram, then select those entities in an existing D Iagram and right click and select "Move to New Diagram" from the context menu:

It would create a new diagram and move Teacher and Course entities to a new diagram as shown below:

So, in the this-is-a-can create a new diagram from an existing diagram.

You can also include the related entities of a particular entity. For example, right click on Student entity→select ' Include related '. Standard and Course entities would also be included, because Student have their reference property:

This would include standard and Course entity as shown below.

Additionally, you can also move properties up or down by right clicking on the property→select move Property→select up /down etc. as shown below:

Difference between delete and remove entity:

You can remove the entity from the diagram by right clicking on entity and selecting ' Remove from Diagram '.

Remove from Diagram would only remove the entity from the Diagram whereas ' delete from Model ' would Delete the entity from T He EDM. So you won ' is able to use this entity at all.

Entity Framework Tutorial Basics (in): Multiple diagrams

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.