"data source" is not a supported keyword when creating an Entity Framework Context.

connection-string entity-framework

Accepted Answer

The actual source of this issue that you were receiving was due to the" in your connection string's values.

It will function properly if you substitute single quotes for them.

https://docs.microsoft.com/archive/blogs/rickandy/explicit-connection-string-for-ef

(Posted so that others may address the issue more quickly than I did.)

317
2/22/2020 4:57:37 PM

Popular Answer

I made a change to solve this.EntityClient ahead toSqlClient even if Entity Framework was being used.

My whole connection string therefore has the following structure:

<add name="DefaultConnection" connectionString="Data Source=localhost;Initial Catalog=xxx;Persist Security Info=True;User ID=xxx;Password=xxx" providerName="System.Data.SqlClient" />


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