News

EF Core 7 Finally Divorces Old .NET Framework

It has been quite a project to rip out the Entity Framework bits from the old, proprietary Windows-only .NET Framework and put them in its successor, the open source, cross-platform ".NET Core" scheme that became just .NET 5, .NET 6, .NET 7 and so on.

In fact, it was only last summer that we reported the dev team was still playing catch-up to the old version of EF (which stopped at version 6) in the article "EF Core 6 Dev Team Plays Catch-Up with EF6." However, while it plays catch-up, the team also introduces new goodies not to be found in the .NET Framework version.

Microsoft guidance says: "EF Core has always supported many scenarios not covered by the legacy EF6 stack, as well as being generally much higher performing. However, EF6 has likewise supported scenarios not covered by EF Core. EF7 will add support for many of these scenarios, allowing more applications to port from legacy EF6 to EF7. At the same time, we are planning a comprehensive porting guide for applications moving from legacy EF6 to EF Core."

And in the first preview release of EF Core 7.0 that was announced last week, an important milestone was reached.

"EF7 will not run on .NET Framework," said Microsoft senior program manager Jeremy Likness in a Feb. 17 blog post. (Editor's note: As mentioned by astute readers in the comments section, this is not the first release to not run on .NET Framework. I apologize for the error.)

While Entity Framework was originally part of the .NET Framework, as of Entity Framework 6 the runtime was separated from that platform, to be delivered via NuGet.

As Microsoft describes:

  • Entity Framework 6 (EF6) is a tried and tested object-relational mapper (O/RM) for .NET with many years of feature development and stabilization. It is a stable, supported product but is no longer being actively developed.
  • Entity Framework (EF) Core is a lightweight, extensible, open source and cross-platform version of the popular Entity Framework data access technology. As a modern object-database mapper for .NET, it supports LINQ queries, change tracking, updates and schema migrations.

Besides not running on .NET Framework, Entity Framework 7 Preview 1 (or EF Core 7 or EF7), mostly fixed bugs and addressed issues -- more than 80, in fact.

Likness did note that EF7 now targets .NET 6, but might support .NET 7 as general availability nears in November. It will also not target any .NET Standard versions. Also, as EF6 was a long-term support (LTS) release with extended support, EF7 is a Current release that will see support for 18 months.

The EF Core Section on the Themes of .NET Site
[Click on image for larger view.] The EF Core Section on the Themes of .NET Site (source: Microsoft).

Going forward, Microsoft's Themes of .NET site shows what's on tap generally for EF7 as shown in the graphic above.

Also the project's high-level plan says "EF7 will contain a small number of breaking changes as we continue to evolve both EF Core and the .NET platform. Our goal is to minimize breaking changes as much as possible."

It also follows four themes:

  • Highly requested features
  • .NET platforms and ecosystem
  • Clear path forward from EF6
  • Performance

That first theme, highly requested features, includes:

  • JSON columns
  • Bulk updates
  • Lifecycle hooks
  • Table-per-concrete-type (TPC) mapping
  • Map CUD operations to stored procedures
  • Value objects
  • Support value generation when using value converters
  • Raw SQL queries for unmapped types
  • Database scaffolding templates

More information can be found in EF documentation and the project's GitHub repo.

About the Author

David Ramel is an editor and writer at Converge 360.

comments powered by Disqus

Featured

  • Compare New GitHub Copilot Free Plan for Visual Studio/VS Code to Paid Plans

    The free plan restricts the number of completions, chat requests and access to AI models, being suitable for occasional users and small projects.

  • Diving Deep into .NET MAUI

    Ever since someone figured out that fiddling bits results in source code, developers have sought one codebase for all types of apps on all platforms, with Microsoft's latest attempt to further that effort being .NET MAUI.

  • Copilot AI Boosts Abound in New VS Code v1.96

    Microsoft improved on its new "Copilot Edit" functionality in the latest release of Visual Studio Code, v1.96, its open-source based code editor that has become the most popular in the world according to many surveys.

  • AdaBoost Regression Using C#

    Dr. James McCaffrey from Microsoft Research presents a complete end-to-end demonstration of the AdaBoost.R2 algorithm for regression problems (where the goal is to predict a single numeric value). The implementation follows the original source research paper closely, so you can use it as a guide for customization for specific scenarios.

  • Versioning and Documenting ASP.NET Core Services

    Building an API with ASP.NET Core is only half the job. If your API is going to live more than one release cycle, you're going to need to version it. If you have other people building clients for it, you're going to need to document it.

Subscribe on YouTube