EF Core 6 Dev Team Plays Catch-Up with EF6

In announcing the sixth preview release of EF Core 6.0, Microsoft noted the dev team for the open source, cross-platform data development framework is still playing catch-up with EF6, the traditional object-relational mapping (ORM) framework formerly tied to the Windows-only .NET Framework.

While Entity Framework was originally part of that .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.

Earlier this month, in announcing new EF 6 Core capabilities introduced in .NET 6 Preview 6, Microsoft's Jeremy Likness reported on the EF Core 6 team's progress in providing equivalent functionality to EF6.

"In addition to adding new capabilities, we are closing the gap between EF Core and EF6," Likness said. "Issue #24106 shares details about the differences and our roadmap to eliminate it. We are making progress on features like migrations bundles and implicit ownership in the Azure Cosmos DB provider but are not quite ready for you to test them yet. However, many updates are available right now when you download preview 6."

That GitHub issue he mentioned, to "Narrow the feature gap between EF Core and EF6," says there are still some scenarios supported on EF6 that aren't supported on EF Core, so to ease the transition from EF6 to EF Core the team plans to close that gap as much as possible, although, by design, some scenarios will not be supported. Those scenarios being worked on include:

Narrow the feature gap between EF Core and EF6
[Click on image for larger view.] 'Narrow the feature gap between EF Core and EF6' (source: Microsoft).

A full comparison of EF Core and EF6 shows all the differences. One area of special focus is data querying, as the "Plan for EF Core 6.0" says: "We plan to close the query gap to EF6 and make supported EF Core queries a true superset of supported EF6 queries." Regarding data querying, the comparison shows this:

Feature Comparison
[Click on image for larger view.] Feature Comparison (source: Microsoft).

As for new features introduced earlier this month as part of EF Core 6.0 Preview 6, Likness pointed out pre-convention model configuration. He said that doing an initial discovery of a model based only on DbSet roots reasonable when it was easy to distinguish likely scalar properties from likely navigation properties, but that approach became increasingly problematic as more types were mapped. For that reason, "We focused on finding ways to enhance model building so that it can more efficiently figure out what is an entity type and what is not."

Other highlights of Preview 6 include:

  • Support for 64-bit identity seed values
  • Support for new BCL DateOnly and TimeOnly structs for SQLite
  • Uniquify and validate check constraint names

When a reader asked when there will be support of DateOnly and TimeOnly for SQL Server, another reader advised him to "Upvote dotnet/SqlClient#1009 to let 'em know it's important to you."

About the Author

David Ramel is an editor and writer for Converge360.

comments powered by Disqus


  • GitHub Copilot for Azure Gets Preview Glitches

    This reporter, recently accepted to preview GitHub Copilot for Azure, has thus far found the tool to be, well, glitchy.

  • New .NET 9 Templates for Blazor Hybrid, .NET MAUI

    Microsoft's fifth preview of .NET 9 nods at AI development while also introducing new templates for some of the more popular project types, including Blazor Hybrid and .NET MAUI.

  • What's Next for ASP.NET Core and Blazor

    Since its inception as an intriguing experiment in leveraging WebAssembly to enable dynamic web development with C#, Blazor has evolved into a mature, fully featured framework. Integral to the ASP.NET Core ecosystem, Blazor offers developers a unique combination of server-side rendering and rich client-side interactivity.

  • Nearest Centroid Classification for Numeric Data Using C#

    Here's a complete end-to-end demo of what Dr. James McCaffrey of Microsoft Research says is arguably the simplest possible classification technique.

  • .NET MAUI in VS Code Goes GA

    Visual Studio Code's .NET MAUI workload, which evolves the former Xamarin.Forms mobile-centric framework by adding support for creating desktop applications, has reached general availability.

Subscribe on YouTube