News

What's New in EF Core 6.0 Preview 1

The Entity Framework Core 6 dev team shipped Preview 1 this week, headed toward a debut with the larger, unifying .NET 6 umbrella platform in November.

EF Core is a modern object-database mapper for .NET, supporting LINQ queries, change tracking, updates and schema migrations. It works with SQL Server, Azure SQL Database, SQLite, Azure Cosmos DB, MySQL, PostgreSQL and other databases, Microsoft says, through a provider plugin API. It's the cross-platform, open source successor to Entity Framework that was included in the old, Windows-only .NET Framework that has evolved into .NET 5/6.

Its November debut will come one year after Microsoft shipped EF Core 5 as part of .NET 5, and it will be a long-term support (LTS) release, good to go for three years.

The first preview of EF Core 6 doesn't include much in the way of new functionality, basically featuring a bunch of minor tweaks to incrementally improve the developer experience. The finished product, however, will include many highly requested features from developers, as reported in the article "Entity Framework Core 6: What Developers Want."

EF Core 6 CLI
[Click on image for larger view.] EF Core 6 CLI (source: EF Core 6 CLI).

Microsoft also lays out the landscape in its Plan for Entity Framework Core 6.0, which further details those highly requested features (links take you to associated GitHub issues, and descriptions are from Microsoft):

  • SQL Server temporal tables -- Temporal tables support queries for data stored in the table at any point in time, as opposed to only the most recent data stored as is the case for normal tables. EF Core 6.0 will allow temporal tables to be created via Migrations, as well as allowing access to the data through LINQ queries.
  • JSON columns -- This feature will introduce a common mechanism and patterns for JSON support that can be implemented by any database provider. We will work with the community to align existing implementations for Npgsql and Pomelo MySQL, and also add support for SQL Server and SQLite.
  • ColumnAttribute.Order -- This feature will allow arbitrary ordering of columns when creating a table with Migrations or EnsureCreated. Note that changing the order of columns in an existing tables requires that the table be rebuilt, and this is not something that we plan to support in any EF Core release.

Meanwhile, on the performance front, the plan lists these items:

  • Performance infrastructure and new tests (no link) -- The EF Core codebase already contains a set of performance benchmarks that are executed every day. For 6.0, we plan to improve the infrastructure for these tests as well as adding new tests. We will also profile mainline perf scenarios and fix any low-hanging fruit found.
  • Compiled models -- Compiled models will allow the generation of a compiled form of the EF model. This will provide both better startup performance, as well as generally better performance when accessing the model.
  • TechEmpower Fortunes -- We have been running the industry standard TechEmpower benchmarks on .NET against a PostgreSQL database for several years. The Fortunes benchmark is particularly relevant to EF scenarios. We have multiple variations of this benchmark
  • Linker/AOT -- EF Core performs large amounts of runtime code generation. This is challenging for app models that depend on linker tree shaking, such as Xamarin and Blazor, and platforms that don't allow dynamic compilation, such as iOS. We will continue investigating in this space as part of EF Core 6.0 and make targeted improvements as we can. However, we do not expect to fully close the gap in the 6.0 time frame.

As far as what's new in Preview 1, Microsoft's "What's New in EF Core 6.0" documentation lists a dozen or so item ranging from several new attributes (UnicodeAttribute, PrecisionAttribute, EntityTypeConfigurationAttribute) to "Support for SQL Server sparse columns" to "Database comments are scaffolded to code comments."

More information is available in the high-level plan for EF Core 6.0, the release planning process, the EF Core GitHub repo and the list of EF Core issues.

Along with announcing Entity Framework Core 6.0 Preview 1, Microsoft this week also shipped .NET 6 Preview 1 and provided a list of what's new for the web-dev ASP.NET Core component.

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