What of DbConfigurationType? #1104
-
I am attempting to migrate multiple projects from MySql.Data and MySql.EntityFramework to MySqlConnector. I am however having trouble understanding how to replace MySql.EntityFramework. My projects are actually extensions to a proprietary application. As such, app.config/web.config would be ignored because the extension project is not the main project being loaded at startup. Below is an example of how I have worked around this issue in MySql.Data.EntityFramework. How do I make this work with MySqlConnector? The important part is this:
EDIT: Oh I see, apparently I also need Pomelo.EntityFrameworkCore.MySql. Haven't checked it out yet, so I am not sure if it is quite as drop-in replacement to MySql.Data.EntityFramework as MySqlConnector is to MySql.Data. I am however starting to doubt if changing dependencies is worthwhile in my case.,
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
There is no Entity Framework driver for MySQL that uses MySqlConnector. If you're using EF, you need to stick with MySql.Data.EntityFramework (and MySql.Data). If you're using Entity Framework Core, then Pomelo.EntityFrameworkCore.MySql is a replacement for MySql.Data.EntityFrameworkCore or MySql.EntityFrameworkCore. You'll have to evaluate the migration effort, but it may not be worth switching from EF to EF Core just to use MySqlConnector, particularly if that also requires a switch from .NET Framework to .NET 6.0. |
Beta Was this translation helpful? Give feedback.
There is no Entity Framework driver for MySQL that uses MySqlConnector. If you're using EF, you need to stick with MySql.Data.EntityFramework (and MySql.Data).
If you're using Entity Framework Core, then Pomelo.EntityFrameworkCore.MySql is a replacement for MySql.Data.EntityFrameworkCore or MySql.EntityFrameworkCore.
You'll have to evaluate the migration effort, but it may not be worth switching from EF to EF Core just to use MySqlConnector, particularly if that also requires a switch from .NET Framework to .NET 6.0.