在EF Model First设计中添加索引 [英] Add index in EF Model First design

查看:193
本文介绍了在EF Model First设计中添加索引的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我喜欢使用Entity Framework进行模型设计的选项(4)。但是,我还没有找到如何在除主键之外的表中添加附加索引。



在视觉设计师中有可能吗?或者您需要在创建数据库之后手动添加索引(这将是设计器的缺点)?

解决方案

这个文章影响DDL生成的部分



HTH


I like the option of doing model first design with the Entity Framework (4). However, I haven't been able to find out how to add an additional index to a table besides the primary key.

Is this possible in the visual designer? Or do you need to add an index manually after creating the database (which would be a shortcoming of the designer)?

解决方案

Read this article. Section Influencing the DDL Generation.

HTH

这篇关于在EF Model First设计中添加索引的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆