C# Entity Framework: Keyword not supported: 'port'

前端 未结 5 2204
挽巷
挽巷 2020-12-20 16:38

Hello I have more than one project connecting to a certain DB that is CodeFirst Entity Framework.

All Projects are able to connect successfully except for one stubbo

5条回答
  •  粉色の甜心
    2020-12-20 17:13

    I definitively solved the problem using the MySql Connector 8.0.x and following instructions on this link: https://davidsekar.com/asp-net/mysql-error-the-provider-did-not-return-a-providermanifesttoken.

    in details:

    1. Install MySql.Data.EntityFramework. Do not install Install MySql.Data.Entity!

    2. Configure web.config / app.config in this way:

      2.1. Change the tag to

      2.2. Add/change the provider. It has to be:

      2.3. Connection string now can be server=myservername;port=3306;uid=myaccount;database=mydb;pwd=mypwd123

    3. Open your DbContext's configuration class (if presente) and place the following code in it's constructor: SetSqlGenerator("MySql.Data.MySqlClient" new MySql.Data.EntityFramework.MySqlMigrationSqlGenerator());

提交回复
热议问题