.edmx文件的目的是什么? [英] What is the purpose of .edmx files?

查看:106
本文介绍了.edmx文件的目的是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

.edmx文件的作用是什么?阅读CSDL,SSDL和MSL规范,在我看来.edmx文件仅在设计时使用.我们是否打算将其与其他edmx一起分发?似乎我们需要分发.ssdl和/或.csdl文件.

What is the purpose of .edmx files? Reading the CSDL, SSDL, and MSL specifications, it looks to me like .edmx files are used only at design time. Are we meant to distribute it with the other edmx? It seems like we need to distribute the .ssdl and/or .csdl files instead.

推荐答案

EDMX是Visual Studio的容器",用于处理有关实体数据模型的所有事情.

EDMX is Visual Studio's "container" for all things about your Entity Data Model.

它包含CSDL,SSDL,MSL中的所有信息,以及有关Visual Studio设计器表中表格的视觉布局的信息.

It contains all the information that is in the CSDL, SSDL, MSL, plus information about the visual layout of the tables in your Visual Studio designer surface.

在构建过程中,EDMX文件将转换为CSDL,SSDL,MSL(通常作为组件中的资源嵌入).您绝对不必在任何地方分发或复制EDMX文件即可运行该应用程序.

The EDMX file is converted into CSDL, SSDL, MSL (typically embedded as resources in your assembly) during the build process. You definitely don't have to distribute or copy the EDMX files anywhere for the app to run.

更新:如果您对基于代码的方法更感兴趣,则应查看

Update: if you are more interested in a code-based approach, you should check out the code-first CTP for Entity Framework which gets by without any .edmx, .csdl/ssdl/msl files at all.

这篇关于.edmx文件的目的是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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