First Azure connection using Entity Framework code

azure code-first connection-string ef-code-first entity-framework

Popular Answer

I recently had the same issue.

The connection string lacks every piece of information that Entity Framework expects. You must put the connection string supplied by SQL Azure into theprovider connection string EF's connection string's argument.

<add name="MyConnectionString" connectionString="metadata=res://*/Model.Model.csdl|res://*/Model.Model.ssdl|res://*/Model.Model.msl;provider=System.Data.SqlClient;provider connection string=&quot;[PUT SQL AZURE CONN STRING HERE]&quot;" providerName="System.Data.EntityClient" />

The metadata from your own project must be used. That information was taken from an EF project that was created using an existing database.

5
7/26/2012 12:20:54 AM


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