Sunday, 23 August 2009

Entity Framework Metadata Resources

When you create an EF model, the metadata is defined in an .EDMX file. This file contains three sections:
  1. 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.
  2. 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.
  3. 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.

4 comments:

jason dotnet mason said...

Oh really?

Anonymous said...

This is my first time pay a visit at here and i amm actually happy to read all
at single place.

Here is my page ... dafapoker

Anonymous said...

Hello, i read your blog from time to time and i own a similar one and i
was just curious iif you get a lot of spam responses?

If so how do you proteect againswt it, any plugin or anything you can advise?
I get so mudh lately it'sdriving me crazy soo any support iis very much appreciated.


Haave a loook att my website: m88

Anonymous said...

Ӏ think tҺe admin of this web site іs rеally woгking hard in support
oof ɦis web site, aѕ here eѵery informɑtion iis quality bqsed stuff.


Мy web blog :: League Of Angels Hacks Tool With Gold Diamond and VIP Cheats