Why is a metadata property required for an Entity Framework Connection?

connection connection-string data-access-layer database entity-framework

Accepted Answer

You will learn a lot from the following links:

http://msdn.microsoft.com/en-us/library/system.data.entityclient.entityconnection.connectionstring.aspx

http://weblogs.asp.net/pgielens/archive/2006/08/21/ADO.NET-Entity-Framework-Metadata.aspx

In conclusion? The metadata is necessary for Entity Framework to create your entity mappings.

Additionally, rather than building it in code, you should think about shifting your connection information out to your configuration file. You may find instructions for doing that on the first link.

10
1/30/2009 7:33:52 PM

Popular Answer

Adding to Randolpho's response:

The location of is precisely indicated via the metadata attribute. Storage Model, or SSDL. .MSL (Mapping Model) and.CSDL (Conceptual Model) files. The Entity Data Model is just these three files. The files are included as resources in the built EDM assembly, as indicated by the "res:/" URI-style qualifier.



Related Questions





Related

Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow