zzzprojects / EntityFramework-Classic

Entity Framework Classic is a supported version of the latest EF6 codebase. It supports .NET Framework and .NET Core and overcomes some EF limitations by adding tons of must-haves built-in features.
https://entityframework-classic.net
Other
102 stars 27 forks source link

MySql Provider Implementation #28

Closed EerieExpanse closed 5 years ago

EerieExpanse commented 5 years ago

First of all, thank you for creating such an important project for those who are frustrated with some of the quirks of EF Core. For my project, we use MariaDb in production. Is there an ETA for when you'll implement provider support for MySQL? Thanks! 👍

JonathanMagnan commented 5 years ago

Hello @EstelaEstela ,

Thank you for your good word.

We will prepare a letter this week and send it to MySQL owners (and maybe some other provider). Our library in fact already support MySQL by default, it's more MySQL that still doesn't support our library yet.

If they choose to try to support EF Classic, it should be very easy on their side. They simply need to make a new branch and use as reference EF Classic instead of EF6 and release a new package with it. They doesn't need to support .NET Core, they can choose to stick by supporting .NET Framework.

I will let you know when the letter will be sent and at who we have sent it.

Best Regards,

Jonathan

JonathanMagnan commented 5 years ago

Hello @EstelaEstela ,

Just to let you know that we have contacted them but we never heard anything from them yet ;( We will try again this week.

Unfortunately, there is not much we can do on our side unless we choose to try to decompile their dll and recompile it against EF Classic.

EerieExpanse commented 5 years ago

Hey @JonathanMagnan ,

Thanks for letting me know 👍

denniske commented 5 years ago

Hello @JonathanMagnan ,

I am also interested in MySQL support.

Who is MySQL owners? Is this a company? Or a nuget package?

What about open source providers like https://github.com/PomeloFoundation/Pomelo.EntityFrameworkCore.MySql ?

JonathanMagnan commented 5 years ago

Hello @denniske ,

Oracle Corporation own MySQL. We tried to contact them twice.

We are currently waiting if they answer us as we would prefer they make an official package but in the worse scenario, we will fork their repository https://github.com/mysql/mysql-connector-net/tree/8.0 and create a package on our side that support it (if that's possible!)

Unless I'm wrong, Pomelo only support EF Core which mean it will be A LOT more complex to support than MySQL Connection since they cannot simply make their code compatible with .NET Standard they need to create a whole project that support EF6.

We will probably start to look at this request in April if we got no answer

JonathanMagnan commented 5 years ago

Hello @EstelaEstela , @denniske ,

Since we have got no answer yet, we choose to create a pull on their repository: https://github.com/mysql/mysql-connector-net

We make an initial test for NET45 and NETStandard and it was fairly easy to support, we didn't fully test it yet.

Once the pull is ready, I will post it here as well so you will be able to comment on the pull to perhaps make it happen.

We will look at it this week. If it takes more times, we will let you know.

JonathanMagnan commented 5 years ago

Hello @EstelaEstela , @denniske ,

Sorry for the very long delay, we should have released our version way before.

The first version of MySql is now ready: https://www.nuget.org/packages/Z.EntityFramework.Classic.MySql/

Since that's not the official provider but a custom version on our side, some stuff must be modified in the config file. See the following documentation: https://entityframework-classic.net/provider-mysql

If you have the chance to test it, let me know if everything works as expected.