简体   繁体   中英

How to integrate MySQL with .NET Core 3 and Entity Framework 6

I have a database project on full .NET Framework with Entity framework 6.3 and MySql.Data.MySqlClient as provider (package MySql.Data and MySql.Data.EntityFramework bot 8.0.18 ). This all works as expected.

Now I would like to port this to .NET Core 3.0 .I still need to stay on Entity framework 6.3 and use old EDMX model .I've created new Core project and linked database entities and edmx ( port existing EF 6.3 to core ). The problem I encounter is that the provider MySql.Data.MySqlClient ( MySql.Data.EntityFramework NuGet package) doesn't seem to include a .NET Core version.

Am I missing a NuGet package? Do I need another MySql provider, that will work on .NET Core 3.0 and Entity Framework 6.3 ?

Meanwhile, Oracle ports their code to .NET Core 3.0, we released our package that supports it:

You will need MySql.Data.EntityFramework to port their provider to support .NET Core 3.0 (and possibly EF 6.3) before you can proceed.

to add SQL Server provider to you project, can use the following command using the dotnet tool:

dotnet add package Microsoft.EntityFrameworkCore.MySql

dotnet tool install --global dotnet-ef

Entity Framework Core project:

https://github.com/aspnet/EntityFrameworkCore/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+is%3Aissue+milestone%3A3.1.0+label%3Aclosed-fixed

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM