Entity Framework Tutorial Basics(41):Multiple Diagrams
Multiple Diagrams in Entity Framework 5.0
Visual Studio 2012 provides a facility to split the design time visual representation of the Entity Data Model. This means that you can have multiple diagrams for one Entity Data Model.
You can create a new diagram in multiple ways:
- Add a new diagram and drag and drop entities from Model Browser
- Move entities from an 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 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 you want to move Teacher and Course entities to a new diagram, then select those entities in an existing diagram and right click and select 'Move to New Diagram' from the context menu:
It will create a new diagram and move Teacher and Course entities to a new diagram as shown below:
So, in this way you 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 will also be included, because Student has their reference property:
This will 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 will only remove the entity from the diagram whereas 'Delete from Model' will delete the entity from the EDM. So you won't be able to use that entity at all.
Entity Framework Tutorial Basics(41):Multiple Diagrams的更多相关文章
- Entity Framework Tutorial Basics(1):Introduction
以下系列文章为Entity Framework Turial Basics系列 http://www.entityframeworktutorial.net/EntityFramework5/enti ...
- Entity Framework Tutorial Basics(4):Setup Entity Framework Environment
Setup Entity Framework Environment: Entity Framework 5.0 API was distributed in two places, in NuGet ...
- Entity Framework Tutorial Basics(43):Download Sample Project
Download Sample Project: Download sample project for basic Entity Framework tutorials. Sample projec ...
- Entity Framework Tutorial Basics(42):Colored Entity
Colored Entity in Entity Framework 5.0 You can change the color of an entity in the designer so that ...
- Entity Framework Tutorial Basics(37):Lazy Loading
Lazy Loading: One of the important functions of Entity Framework is lazy loading. Lazy loading means ...
- Entity Framework Tutorial Basics(36):Eager Loading
Eager Loading: Eager loading is the process whereby a query for one type of entity also loads relate ...
- Entity Framework Tutorial Basics(34):Table-Valued Function
Table-Valued Function in Entity Framework 5.0 Entity Framework 5.0 supports Table-valued functions o ...
- Entity Framework Tutorial Basics(33):Spatial Data type support in Entity Framework 5.0
Spatial Data type support in Entity Framework 5.0 MS SQL Server 2008 introduced two spatial data typ ...
- Entity Framework Tutorial Basics(32):Enum Support
Enum in Entity Framework: You can now have an Enum in Entity Framework 5.0 onwards. EF 5 should targ ...
随机推荐
- database - 数据库设计/使用容易忽略的细节
一.设计 1,数据类型尽量使用数字型,数字型的比较比字符型的快很多 2,数据类型尽量小,预测可以满足未来需求的前提 3,尽量建表时字段不允许为null,除非必要,可以用NOT NULL+DEFAULT ...
- 【Swift】- UITextField完成输入后关闭软键盘的几种方法
总结了以下几种方式,欢迎补充 1,为空白区域绑定Touch Up Inside事件 2,重写touchesEnded方法 3,为TextField绑定Did End On Exit事件 1,点击 ...
- #51单片机#蓝牙模块(ATK-SPP-HC06从机串口)的使用方法
#include <AT89X51.H> #include <intrins.h> // 函数原形定义 #define uchar unsigned char #define ...
- Maven依赖war开发,找不到war里头的class解决方案
问题描述: 开发一个web系统,需要引用另一个excel.war[在该系统里头是一个excel的导入导出小模块]进行项目 <dependency> <groupId>com.b ...
- php时间 显示刚刚 几分钟前等
功能示例: $now = time();foreach($sys_res as $k => $v){ $day = intval(floor(($now - $v->system_time ...
- redis和phpredis扩展的安装
redis的安装https://code.google.com/p/redis/downloads/list下载redisredis-2.6.13.tar.gztar -xvzf redis-2.6. ...
- 多线程使用信号量sem_init,sem_wait,sem_post
信号量的主要函数有: int sem_init(sem_t *sem,int pshared,unsigned int value); int sem_wait(sem_t *sem); int se ...
- Kaggle 比赛项目总结(项目流程)
一.EDA(Exploratory Data Analysis) EDA:也就是探索性的分析数据 目的: 理解每个特征的意义: 知道哪些特征是有用的,这些特征哪些是直接可以用的,哪些需要经过变换才能用 ...
- python's twenty-seventh day for me 模
time模块: 1,计算执行代码的时间 time.time() 2,让程序停这里一段时间 time.sleep(时间(s)) 时间戳时间: import time print(time.time()) ...
- activemq安装运行及其在springboot中的queue和topic使用
安装activemq 运行 springboot使用 依赖 配置 Producer Consumer ComsumerTopic 使用 安装activemq http://activemq.apach ...