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

  • IDE Irony: Coding Errors Cause 'Critical' Vulnerability in Visual Studio

    In a larger-than-normal Patch Tuesday, Microsoft warned of a "critical" vulnerability in Visual Studio that should be fixed immediately if automatic patching isn't enabled, ironically caused by coding errors.

  • Building Blazor Applications

    A trio of Blazor experts will conduct a full-day workshop for devs to learn everything about the tech a a March developer conference in Las Vegas keynoted by Microsoft execs and featuring many Microsoft devs.

  • Gradient Boosting Regression Using C#

    Dr. James McCaffrey from Microsoft Research presents a complete end-to-end demonstration of the gradient boosting regression technique, where the goal is to predict a single numeric value. Compared to existing library implementations of gradient boosting regression, a from-scratch implementation allows much easier customization and integration with other .NET systems.

  • Microsoft Execs to Tackle AI and Cloud in Dev Conference Keynotes

    AI unsurprisingly is all over keynotes that Microsoft execs will helm to kick off the Visual Studio Live! developer conference in Las Vegas, March 10-14, which the company described as "a must-attend event."

  • Copilot Agentic AI Dev Environment Opens Up to All

    Microsoft removed waitlist restrictions for some of its most advanced GenAI tech, Copilot Workspace, recently made available as a technical preview.

Subscribe on YouTube