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 for Converge360.

comments powered by Disqus

Featured

  • AI for GitHub Collaboration? Maybe Not So Much

    No doubt GitHub Copilot has been a boon for developers, but AI might not be the best tool for collaboration, according to developers weighing in on a recent social media post from the GitHub team.

  • Visual Studio 2022 Getting VS Code 'Command Palette' Equivalent

    As any Visual Studio Code user knows, the editor's command palette is a powerful tool for getting things done quickly, without having to navigate through menus and dialogs. Now, we learn how an equivalent is coming for Microsoft's flagship Visual Studio IDE, invoked by the same familiar Ctrl+Shift+P keyboard shortcut.

  • .NET 9 Preview 3: 'I've Been Waiting 9 Years for This API!'

    Microsoft's third preview of .NET 9 sees a lot of minor tweaks and fixes with no earth-shaking new functionality, but little things can be important to individual developers.

  • Data Anomaly Detection Using a Neural Autoencoder with C#

    Dr. James McCaffrey of Microsoft Research tackles the process of examining a set of source data to find data items that are different in some way from the majority of the source items.

  • What's New for Python, Java in Visual Studio Code

    Microsoft announced March 2024 updates to its Python and Java extensions for Visual Studio Code, the open source-based, cross-platform code editor that has repeatedly been named the No. 1 tool in major development surveys.

Subscribe on YouTube