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 the editor of Visual Studio Magazine.

comments powered by Disqus
Upcoming Events

.NET Insight

Sign up for our newsletter.

Terms and Privacy Policy consent

I agree to this site's Privacy Policy.