Reputation: 434
Installed via NuGet: MySql.Data, MySql.Data.Entities, MySql.Data.Entity.
Web.config:
<connectionStrings>
<add name="WhateverEntities" providerName="MySql.Data.MySqlClient" connectionString="server=127.0.0.1;port=3306;database=dbname;uid=root;password=pass" />
<connectionStrings>
...
<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, Version=6.9.6.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" />
</providers>
<entityFramework>
ApplicationDbContext.cs:
public ApplicationDbContext() : base(nameOrConnectionString: "WhateverEntities") {}
tried to add:
[DbConfigurationType(typeof(MySql.Data.Entity.MySqlEFConfiguration))]
and:
[DbConfigurationType(typeof(MySqlEFConfiguration))]
got this error:
An exception of type 'System.Data.Entity.Core.ProviderIncompatibleException' occurred in EntityFramework.dll but was not handled in user code
Additional information: The provider did not return a ProviderManifestToken string.
What's wrong?
Upvotes: 0
Views: 3171
Reputation: 434
It was a matter of password as vdwijngaert suggested. Changed it in PhpMyAdmin.
Upvotes: 1