I'm trying to move an ASP.NET MVC 5 application to MVC 6 (ASP.NET vNext).
My existing application uses EF 6 and has some EF code first migrations. I want to port these migrations as well, because I want to be able to continue using the existing databases with the existing migrations already applied, without breaking the upgrade path.
It seems that the "new" EF Core migrations (k ef migration add ...
) have quite the different format compared to the "old" EF 6 migrations:
Is there already an "official" way to upgrade these migrations? Is it supported at all? Will it be supported in the future?
To use Entity Framework 6, your project has to compile against . NET Framework, as Entity Framework 6 doesn't support . NET Core. If you need cross-platform features you will need to upgrade to Entity Framework Core.
In this situation you can upgrade to EF5 using the following steps: Select Tools -> Library Package Manager -> Package Manager Console. Run Install-Package EntityFramework -version 5.0. 0.
NET Framework versions will need to target . NET 6 to use EF Core 6.0.
There isn't really a way to do this yet. In general we strongly recommend against trying to upgrade an EF6 application to EF7 yet. EF7 is still very much pre-release.
We will have some guidance on how to do this when we get closer to RTM. We may provide some tools to help or just some guidance on how to do it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With