News

Microsoft Updates Entity Framework, Even as EF Core Ascends

Microsoft shipped a new runtime release of the nine-year-old Entity Framework object/relational mapper (O/RM) even as it cedes mindshare to the newer, lightweight, open source and cross-platform version, Entity Framework Core.

While the Entity Framework 6.2 runtime has been released, associated tools for it weren't shipped but are on the way.

Since the days of Visual Studio 2008 and .NET Framework 3.5 in 2008, Entity Framework has served as the primary data-access technology for the .NET ecosystem.

Still enjoying tremendous popularity, it was last year described by Microsoft as the most popular package listed by NuGet.org, overseer of the NugGet package manager.

In fact, if you go to the Packages page of that site right now, it appears in the No. 3 slot (out of 95,345 packages), having been downloaded more than 35 million times.

However, as Microsoft moves much of its developer tooling and associated frameworks to lighter, more accessible, cross-platform "x.Core" versions, the EF Core project (Microsoft.EntityFrameworkCore 2.0 on NuGet; aspnet/EntityFrameworkCore on GitHub) is getting more attention.

This younger cousin is a rewritten version of the traditional Entity Framework that supports the new .NET Standard 2.0 for consistent API usage across all .NET implementations. EF Core 2.0 -- while introducing many new improvements and features over EF 6 -- shows its immaturity in its lack of some other EF 6 capabilities that .NET programmers have long gotten used to.

For example, while EF Core provides new features -- such as alternate keys and mixed client/database evaluation in LINQ queries -- that Microsoft said wouldn't be implemented in EF 6, it also lacks EF 6 features such as lazy loading, connection resiliency, server-side GroupBy query support and others.

Some missing capabilities are targeted for future versions, such as the EF Core 2.1 release expected in the first quarter of next year.

New Features on the Way
[Click on image for larger view.] New EF Core Features on the Way (source: Microsoft).

Meanwhile, Microsoft continues to support the EF 6 project, just yesterday releasing the EF 6.2 runtime.

"While most of the focus of the EF team is nowadays on adding new features and improvements to EF Core, we plan to keep fixing important bugs, implementing small improvements, and incorporating community contributions in the EF 6 codebase," said project chief Diego B Vega in a blog post. "To a great extent, it is thanks to the efforts [of] our community of open source contributors that EF 6.2 includes numerous bugs fixes and product enhancements."

Vega said the most important changes, including bug fixes, are:

  • Reduce start up time by loading finished code first models from a persistent cache #275
  • Fluent API to define indexes #274
  • DbFunctions.Like() to enable writing LINQ queries that translate to LIKE in SQL #241
  • Migrate.exe should support -script option #240
  • EF6 does not work with primary key from sequence #165
  • Update error numbers for SQL Azure Execution Strategy #83
  • Bug: Retrying queries or SQL commands fails with "The SqlParameter is already contained by another SqlParameterCollection" #81
  • Bug: Evaluation of DbQuery.ToString() frequently times out in the debugger #73

One of those community contributors thanked by Vega is Erik Ejlskov Jensen, who Vega said has taken over the EF Power Tools project with a "Community Edition" fork. EF Tools provide design-time utilities for EF 6 that can be invoked via the Visual Studio Solution Explorer context menu -- for example, by right-clicking in code files to view an underlying Entity Data Model, generate views and so on. The GitHub project for the new community EF 6 Power Tools shows 36 stars and 49 contributors.

Speaking of tools, Vega said that while the EF 6.2 runtime packages have been released, the associated tools aren't quite ready for prime time, needing work to address outstanding issues. The tools will be provided automatically in a future Visual Studio 2017 upgrade and will be available via downloadable installers for previous versions of Visual Studio.

Along with the upcoming EF 6.2 tools, Vega said other future work involves porting the EF 6 documentation to the Microsoft Docs platform and improving support for NuGet's PackageReference.

Meanwhile, work is continuing on EF Core. Vega has published a roadmap of the project and has shed light on the project's Release Planning Process.

Until the EF Core project gets features such as lazy loading and GroupBy in v2.1 early next year, however, many developers will stay clear.

About the Author

David Ramel is an editor and writer at Converge 360.

comments powered by Disqus

Featured

  • Compare New GitHub Copilot Free Plan for Visual Studio/VS Code to Paid Plans

    The free plan restricts the number of completions, chat requests and access to AI models, being suitable for occasional users and small projects.

  • Diving Deep into .NET MAUI

    Ever since someone figured out that fiddling bits results in source code, developers have sought one codebase for all types of apps on all platforms, with Microsoft's latest attempt to further that effort being .NET MAUI.

  • Copilot AI Boosts Abound in New VS Code v1.96

    Microsoft improved on its new "Copilot Edit" functionality in the latest release of Visual Studio Code, v1.96, its open-source based code editor that has become the most popular in the world according to many surveys.

  • AdaBoost Regression Using C#

    Dr. James McCaffrey from Microsoft Research presents a complete end-to-end demonstration of the AdaBoost.R2 algorithm for regression problems (where the goal is to predict a single numeric value). The implementation follows the original source research paper closely, so you can use it as a guide for customization for specific scenarios.

  • Versioning and Documenting ASP.NET Core Services

    Building an API with ASP.NET Core is only half the job. If your API is going to live more than one release cycle, you're going to need to version it. If you have other people building clients for it, you're going to need to document it.

Subscribe on YouTube