News

Entity Framework Core 3.0 Dev Team Struggles with LINQ in Preview 6

Entity Framework Core 3.0 Preview 6 is out, with the development team including an incomplete LINQ implementation marked by temporary limitations and intentional breaking changes.

In other words, the LINQ code is in there, but don't use it seriously yet.

LINQ (Language Integrated Query) uses C# code to query various types of data stores, providing IntelliSense, strong typing and other benefits in an alternative to SQL queries.

The main takeaway in preview 6 is that the LINQ code needed to merged with EF Core for further development to proceed, but developers shouldn't use it in any production code until it's polished up.

"In recent months, a lot of our efforts have been focused on a new LINQ implementation for EF Core 3.0," said Diego Vega, program manager for .NET Data Access, in a June 13 blog post. "Although the work isn't complete and a lot of the intended functionality hasn't been enabled, before preview 6 we reached a point in which we couldn't make more progress without integrating the new implementation into the codebase in the main branch."

Hence the following warning about intentional breaking changes and temporary limitations that will be fixed before final release:

IMPORTANT: Although as always, we want to encourage you to experiment with our preview bits in a controlled environment and to provide feedback, preview 6 has significant limitations in the LINQ implementation that we expect to affect any application that performs all but the most trivial queries. Given this, we want to explicitly recommend you against trying to update any applications you have in production to this preview.

Also released was preview 6 of Entity Framework 6.3, following on last month's preview of EF 6.3, a runtime that was separated from the old, Windows-only .NET Framework in which it was previously integrated.

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.
  • Entity Framework (EF) Core is a lightweight, extensible, open source and cross-platform version of the popular Entity Framework data access technology.

New functionality introduced in EF 6.3 Preview 6 since the previous release include polishing up the use of System.Data.SqlClient ("it's no longer necessary to register SqlClient as a workaround before you start using EF") and infrastructure updates that now see EF 6 tests passing on .NET Core.

New functionality in EF Core 3.0 Preview 6 includes a switch to Microsoft.Data.SqlClient ("The EF Core provider for SQL Server now uses the new package to connect to SQL Server databases.") and DbContext scaffolding improvements.

Going forward in a series of monthly previews before GA release time, Vega promised more LINQ work for EF Core 3.0.

"For upcoming previews and the rest of the EF Core 3.0 release, our main focus will be on restoring and improving the query functionality using our new LINQ implementation," he said.

"We are also working to enable more aspects of the experience you would expect from using EF 6.3 on .NET Core. For example, we are making additional changes to simplify working when an application .config file isn't present, enabling embedding metadata from an EDMX into the compilation output on .NET Core, and reimplementing the EF migration commands in a way that is compatible with .NET Core."

Microsoft, which earlier released the sixth previews for .NET Core 3.0 and ASP.NET Core 3.0, is aiming for general availability of the new offerings in September.

After that, the plan is to drop the "Core" designations and just unify everything under a new .NET 5 moniker late next year.

.NET data developers can get EF Core 3.0 Preview 6 (titled "Microsoft.EntityFrameworkCore.SqlServer") and Entity Framework 6.3 Preview 6 via NuGet.

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