Entity Framework Core 2 Released With Drawbacks
Entity Framework Core 2 Released With Drawbacks
Written by Kay Ewbank   
Thursday, 24 August 2017

Microsoft has released the final version of Entity Framework Core 2.0, alongside .NET Core 2.0 and ASP.NET Core 2.0. Entity Framework (EF) Core is the lightweight cross-platform version of Entity Framework, the Object/Relational Mapping (O/RM) framework for .NET.

ef

The positive aspects of EF Core include a more efficient and robust LINQ implementation, and a simplified provider model along with its utilization of DI. EF Core now targets the new .NET Standard 2.0.

The LINQ implementation improvements start with better handling of sub-queries, which are no longer nested unnecessarily. Queries are also less likely to switch prematurely to client-side evaluation, and LINQ no longer retrieves all the columns of a table when only a few were requested.

A new EF.Functions property has been introduced. This can be used to map operators to database functions or operators, and then have them invoked in LINQ queries. This version adds the Like() operator, so you can use EF.Functions.Like() in a LINQ query and it will be translated to LIKE in SQL or evaluated in memory if necessary.

Global query filters are another improvement. You can now specify filters in the model that are applied automatically to all entities of a type in all queries executed on the DbContext.

However, some improvements that users of EF Core have been hoping for are still missing. SQL generation is still mixed, with still no support for GROUP BY.  The plan is that this will be added in EF Core 2.1.

Another wish-list item that's missing is support for complex types. These have been available and still are in 'full' Entity Framework, relying instead on owned or child types. Writing about this on the .NET blog, Diego B Vega said:

"You can now define “owned” or “child” entities which group properties within other entities, very similar to how complex types used to work in EF6, but with the ability to contain reference navigation properties."

The problem is that this uses a different syntax, making it harder to bring EF models into EF Core from other versions.

Another core SQL concept that hasn't been fully implemented is that of stored procedures. Stored procedures are executed at the server rather than transporting all the data to the app for processing, and can be much more efficient. There are work-arounds but it seems strange this hasn't been added.

Other items on the wish list that haven't been added yet are support for spatial types; and support for lazy loading, where objects are only loaded when they are needed. This is supported (and popular) in full Entity Framework, but has been delayed until EF Core 2.1.

 

ef

More Information

EF Core Page

EF Core Platforms Information

Related Articles

Entity Developer 6.0

EF7 Drops XML Modeling

Entity Framework Everywhere

Release Candidate of First Open Source Entity Framework Available

Entity Framework Open-Sourced - Good or Bad?

To be informed about new articles on I Programmer, sign up for our weekly newsletter, subscribe to the RSS feed and follow us on, Twitter, FacebookGoogle+ or Linkedin.

 

Banner


Atom IDE
13/09/2017

Github has announced Atom IDE, a set of optional packages for the Atom text editor that add IDE features such as code navigation, formatting and auto-completion.



Java EE To Get Open Source Foundation
23/08/2017

Oracle intends to move stewardship of Java EE (Enterprise Edition) to a third party existing foundation after the official release of Java EE 8 later this year.


More News

 

 
 

 

blog comments powered by Disqus

 
 
Banner

   
Banner
RSS feed of news items only
I Programmer News
Copyright © 2017 i-programmer.info. All Rights Reserved.
Joomla! is Free Software released under the GNU/GPL License.