Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Entity Framework and Connections
Message
From
01/03/2011 11:35:06
 
 
To
01/03/2011 10:51:23
Guy Pardoe
Pardoe Development Corporation
Peterborough, New Hampshire, United States
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Miscellaneous
Thread ID:
01500910
Message ID:
01502219
Views:
54
>Hi Viv,
>
>Thanks for the info. It helps give me some perspective. I guess it means the XML file is critical at run-time. I'll see when I test a deployment. :)

Doesn't look like anyone helped you out on the MM.NET aspect so my info is probably of limited use. The key thing to understand is that the EF 'connection string' contains not only the basic SQL connection settings but also pointers to the three pieces of XML that define the entire EF model.

If you open the Properties tab from the EDMX designer you can change the 'Metadata Artifact Processing' option to specify that the model info is written to separate, external XML files rather than being embedded in the DLL - but unless you have specific reasons for this it's simpler to go with the default.
If you need to plug an alternate SQL source into the EF connection string you can do so simply by using the EntityConnectionStringBuilder class:
EntityConnectionStringBuilder esb = new EntityConnectionStringBuilder(s);
esb.ProviderConnectionString = stdSQLConn;
EntityConnection ec = new EntityConnection(esb.ConnectionString);
where s is the EF connectionstring and stdSQLConn is the replacement connection.
Previous
Reply
Map
View

Click here to load this message in the networking platform