问题
I am trying to add MySQL with Entity Framework in Visual Studio. I am using MySQL Server 8.0.12 and also the 8.0.12 Connector/MySql.data. error: MysqlException: Table 'dbname.dbname.tablename' doesn't exists. Normally I have table but dbname name showing twice.
My code's very simple, I want to list all datas in my table:
using (sakilaEntities db = new sakilaEntities())
{
var list = db.country.ToList();
}
I'm getting below error.
UPDATE: Uninstall MySQL Server 8.0.12 and MySQL Connector 8.0.12 then install MySQL Server&Connector 8.0.19. Add below code in your web config.
<providers>
<provider invariantName="MySql.Data.MySqlClient" type="MySql.Data.MySqlClient.MySqlProviderServices, MySql.Data.EntityFramework, Version=8.0.19.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" />
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
</providers>
来源:https://stackoverflow.com/questions/64894690/table-dbname-dbname-tablename-doesnt-exists-error-in-visual-studio-when-addin