I know I'm being fussy, but in researching how Entity Framework creates a DLL from an EDMX file, I came across the following on MSDN:
The Entity Data Model Designer (Entity Designer) stores model and mapping information in an .edmx file at design time. At build time the Entity Designer uses the information in an .edmx file to create the .csdl, .ssdl, and .msl files that are needed by the Entity Framework at runtime.
The statement that the.csdl,.ssdl, and.msl are produced "at build time" genuinely struck me as odd, so I decided to test it. Knowing that the TablePerTypeStrategy.xaml flow is what creates the files, I uninstalled it and attempted to develop my own application. It was a hit.
I did get a missing TablePerTypeStrategy.xaml problem when I selected "create database from model." I became perplexed since it is obvious from this test that I am trying to produce the database, not develop the application, when I attempt to do so.
What do I not see here?
For usage by the Entity Framework classes at runtime, those files (.csdl,.ssdl, and.msl) are produced at build time and inserted as resources within the assembly. A alternative procedure that produces a database construction script is creating a database from a model.
Build your project once first if you want to view *.csdl, *.ssdl, and *.msl files. After choosing your project (which contains the edmx files), as seen in the screenshot below, click on the "Show All Files" option in the solution explorer (indicated with a red arrow).
As shown by the directory structure,
As can be seen in, all of the entity framework-specific xml files are generated during construction
and are incorporated as resources in a folder.
In my project, there were two edmx files, namely
As a result, each file type is represented by two sets. I hope this viewpoint becomes useful to someone.
Note: By just changing a property for EF model designer as proposed by here, all of these EF meta information files may also be quickly moved to the project output directory (instead of being embedded).