When you create an EF model, the metadata is defined in an .EDMX file. This file contains three sections:
- SSDL = storage model: defines the 'shape' of the database in which the data is stored. This includes the tables, their columns and the relationships between tables. All data types are defined in database types e.g., varchar.
- CSDL = conceptual model: defines the 'shape' of your entity model. This includes the classes, their properties, and the relationship between classes. All data types are defined in .Net types e.g., System.String or System.Int32.
- MSL = mapping model: describes how the conceptual model is mapped onto the storage model. E.g., each property in the conceptual model is mapped to a column in the storage model.
Where does all this information go?
When you compile a project that contains an .EDMX file, three resources are embedded into your assembly. Not surprisingly, these resources are yourContainer.SSDL, yourContainer.CSDL, and yourContainer.MSL (where yourContainer is the name of your entity container). If you open your assembly in .Net Reflector you'll see they contain, verbatim, the XML from each section of the .EDMX.