4
I am trying to work with a Mysql database in my application. However, I am getting the following error:
Keyword not supported: 'data source'.
I performed all the procedures related in this question
But in summary, I performed this installation in my NuGet
PM> Install-Package MySQL.Data.Entities
Web.config
<connectionStrings>
<clear />
<add name="BancoDados" connectionString="Data Source=mysql01.hospedagemdesites.ws;
Initial Catalog=catalog;
User ID=userid;
Password=password;"
providerName="System.Data.EntityClient" />
</connectionStrings>
App.config (Repositorioef)
<entityFramework>
<defaultConnectionFactory type="MySql.Data.Entity.MySqlConnectionFactory, MySql.Data.Entity.EF6" />
<providers>
<provider invariantName="MySql.Data.MySqlClient" type="MySql.Data.MySqlClient.MySqlProviderServices, MySql.Data.Entity.EF6" />
</providers>
</entityFramework>
Context
[DbConfigurationType(typeof(MySql.Data.Entity.MySqlEFConfiguration))]
public class Contexto : DbContext
{
public Contexto()
: base("BancoDados")
{
}
public DbSet<item> item { get; set; }
}
I changed the
provider
as he had recommended me in the other question. With it so :providerName="MySql.Data.MySqlClient"
I was able to go ahead and find myself now with another mistake.Unknown column 'Extent1.Nome' in 'field list'
– Rafael Barbosa