This error comes up when attempting to talk to an .edmx in lieu of going Code First with Entity Framework (i.e. Model First or Database First) and having a connection string that is not formatted in a Model First friendly way. The following is an example of the right was of talking to an .edmx named Foo.edmx in a Models folder somewhere:
<add name="FooEntities" connectionString="metadata=res://*/Models.Foo.csdl|res://*/Models.Foo.ssdl|res://*/Models.Foo.msl;provider=System.Data.SqlClient;provider connection string="data source=www.example.com;initial catalog=whatever;User ID=god;Password=letmein;MultipleActiveResultSets=True;App=EntityFramework"" providerName="System.Data.EntityClient"/>
Note that what you might normally think of as the connection string is wrapped in " bookends and there is some extra gunk wrapping it.
No comments:
Post a Comment