News

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 at Converge 360.

comments powered by Disqus

Featured

  • VS Code Copilot Previews New GPT-4o AI Code Completion Model

    The 4o upgrade includes additional training on more than 275,000 high-quality public repositories in over 30 popular programming languages, said Microsoft-owned GitHub, which created the original "AI pair programmer" years ago.

  • Microsoft's Rust Embrace Continues with Azure SDK Beta

    "Rust's strong type system and ownership model help prevent common programming errors such as null pointer dereferencing and buffer overflows, leading to more secure and stable code."

  • Xcode IDE from Microsoft Archrival Apple Gets Copilot AI

    Just after expanding the reach of its Copilot AI coding assistant to the open-source Eclipse IDE, Microsoft showcased how it's going even further, providing details about a preview version for the Xcode IDE from archrival Apple.

  • Introduction to .NET Aspire

    Two Microsoft experts will present on the cloud-native application stack designed to simplify the development of distributed systems in .NET at the Visual Studio Live! developer conference coming to Las Vegas next month.

  • Microsoft Previews Copilot AI for Open-Source Eclipse IDE

    Catering to Java jockeys, Microsoft is yet again expanding the sprawling reach of its Copilot-branded AI assistants, previewing a coding tool for the open-source Eclipse IDE.

Subscribe on YouTube

Upcoming Training Events