*MVC4.7 and EF EDMX 6 to MVC5.3 and EF? Migration confusion

iqworks Information Quality Works 276 Reputation points
2024-06-01T21:24:29.8166667+00:00

Hi, I am confused. I have an MVC4 project using EF EDMX 6.0.0.0. I need to upgrade my MVC4 to MVC5.

 I understand that because upgrading from MVC4 to MVC5 is different for every project, especially the versions they are upgrading from MVC4 (4.?) to MVC5 (5.?), that there is no straight forward magic bullet set of instructions for this migration. Is MVC5 Core?

Part of my confusion is do I upgrade EF EDMX 6.0.0.0 to a version compatible with MVC5? And does this mean I will be upgrading EF EDMX to a CORE EF of sorts? Is EF version 6.0.0.0 compatible with CORE? 

Is EF 6 only for .netstandard 2.0 and 2.1? The problem is that I have other .net framework asp.net web apps that also need to use the same database. Should I use the current EF EF 6.0.0.0 for the web apps? And use my upgraded MVC5 for DB work with new EF 6.0.0.0 in a dotnetstandard 2.0 or 2.1?

Another part of my confusion is that I see that MVC5 is no longer being worked on and does that mean I should skip the upgrade to MVC5 to the next CORE version that is harder to migrate to from MVC4?

Sorry for all the questions. 

Thanks for any advice or suggestions

ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
3,385 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Lan Huang-MSFT 28,121 Reputation points Microsoft Vendor
    2024-06-03T05:53:07.0166667+00:00

    Hi @iqworks Information Quality Works,

    First you have to differentiate between MVC5 and Core MVC.

    ASP.NET MVC 5 is built on top of .NET Framework. ASP.NET Core MVC is built on top of .NET.

    .NET Framework is serviced monthly with security and reliability bug fixes. .NET Framework will continue to be included with Windows, with no plans to remove it. You don't need to migrate your .NET Framework apps, but for new development, use .NET 6 or later.

    Compare ASP.NET Core and ASP.NET

    Compare .NET and .NET Framework

    There are no current indications that the .NET Framework will be removed, and you can migrate based on your needs.

    How to Upgrade an ASP.NET MVC 4 and Web API Project to ASP.NET MVC 5 and Web API 2

    Upgrade from ASP.NET MVC and Web API to ASP.NET Core MVC

    Second, distinguish between EF and EF Core.

    Entity Framework 6 (EF6) is an object-relational mapper designed for .NET Framework but with support for .NET Core. EF6 is a stable, supported product, but is no longer being actively developed.

    Supported platforms

    EF Core 3.1 runs on .NET Core and .NET Framework, through the use of .NET Standard 2.0. However, EF Core 5.0 does not run on .NET Framework. See Platforms for more details.

    EF6.4 runs on .NET Core and .NET Framework, through multi-targeting.

    EF Core is not a drop-in replacement for EF6. Moving from EF6 to EF Core will likely require changes to your application.

    Compare EF Core & EF6
    Best regards,
    Lan Huang


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.