Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
325 views
in Technique[技术] by (71.8m points)

entity framework - What is the purpose of .edmx files?

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.

question from:https://stackoverflow.com/questions/4941892/what-is-the-purpose-of-edmx-files

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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

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.

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...