EF6 with MySQL. The given key was not present in the dictionary

asp.net asp.net-mvc entity-framework entity-framework-6 mysql

Popular Answer

As may be seen from the error's first few lines,

MySql.Data.MySqlClient.MySqlConnectionStringBuilder.<>c.<.cctor>b__2_7(MySqlConnectionStringBuilder msb, MySqlConnectionStringOption sender) at MySql.Data.MySqlClient.MySqlConnectionStringBuilder.get_Item(String keyword)

The mistake relates to theConnectionString The issue is thatConnectionString consists of unreadable keys.

Attempt to tidy up theConnectionString as a result, it only

  1. server
  2. A user ID
  3. password
  4. database

Regarding me, theConnectionString possessed a spare key.integrated security When this was taken awayUpdate-Database began out well. However, depending on your situation, this may or may not be the key that resulted in the issue.

So one again, let's let my suggested and certain answer succeed.ConnectionString and make it simpler such that it just has the four keys described above.

2
3/28/2017 7:13:08 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