Problem z MySQL w ASP.NET

0

Witam,
mam problem z MySQL w ASP.NET. Chcę domyślną bazę MSSQL zmienić na MySQL, ale w czasie wykonywania pierwszego odwołania do bazy danych MySQL pojawia mi się błąd na rest'ie:

{"Message":"Wystąpił błąd.","ExceptionMessage":"An error occurred accessing the database. This usually means that the connection to the database failed. Check that the connection string is correct and that the appropriate DbContext constructor is being used to specify it or find it in the application's config file. See http://go.microsoft.com/fwlink/?LinkId=386386 for information on DbContext and connections. See the inner exception for details of the failure.","ExceptionType":"System.Data.Entity.Core.ProviderIncompatibleException","StackTrace":"   w System.Data.Entity.Utilities.DbProviderServicesExtensions.GetProviderManifestTokenChecked(DbProviderServices providerServices, DbConnection connection)\r\n   w System.Data.Entity.Infrastructure.DefaultManifestTokenResolver.<>c__DisplayClass1.<ResolveManifestToken>b__0(Tuple`3 k)\r\n   w System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd(TKey key, Func`2 valueFactory)\r\n ...... 

Problem może występować w connectionString, choć nie wiem w którym miejscu.
Konfiguracja web.config

 <connectionStrings>
       <add name="DefaultConnection" connectionString="Server=localhost;Database=myDataBase;Uid=root;Pwd=root;Port=3306" 
providerName="MySql.Data.MySqlClient"/>
  </connectionStrings>
<providers>
           <provider invariantName="MySql.Data.MySqlClient" type="MySql.Data.MySqlClient.MySqlProviderServices, 
MySql.Data.Entity.EF6, Version=6.10.7.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d"/>
      </providers>

Z nugeta zainstalowałem "MySql.Data" w wersji 8.0.12 oraz "MySql.Data.Entity.EF6" w wersji 6.10.7.
Pomoże ktoś ten problem rozwiązać?

0

Bo to nie jest connection string dla Entity Frameworka. Pamiętaj, że to upośledzony ORM, w którym nic nie ma sensu, więc nawet normalnych connection stringów nie można używać.

1 użytkowników online, w tym zalogowanych: 0, gości: 1