EF Core 2.2 is a preview version and they left it clear it's about fixes, improvements and Cosmos DB Provider among other features they developed to leverage the provider development. The team is focused on working hard to release EF Core 3.0 shortly, so for this release the Crown Jewels are the support to the Cosmos DB Provider for NRDB as well as Spatial Data processing. Improvements in Owned Entity Types were briefly mentioned. Those enhancements now allow to create 1toM relationships and also represent the cornerstone on which the NRDB development was created.
Close to Owned Entity Types, another feature that was announced was Query tag. It is a sort of debugging tool that helps to identify, by using tag comments, which SQL query was created from which piece of a complex LINQ query.
EF Core team were so happy to announce the Cosmos SQL Provider given by API that provides methods to handle DDL sentences and CRUD operations can be executed from LINQ queries. The team proudly explained how advances in unity and binary operations improved the algorithms in charge of filtering the Where predicates preventing from unnecessary fetching to server increasing the performance. Besides that, more LINQ operations have been mapped to be carried out as server side functions.
Cosmos SQL Provider still has some limitations such as LINQ running synchronously, include clause that could increase server round trips, Join not fully supported yet, and client running complex queries due in-memory evaluations when different entities are joint.
Regarding Spatial Data... NetTopologySuite, a robust library widely tested in the PostgresSQL field, was introduced to include Polygons, Point, and more types in LINQ queries granting support to server side Spatial computations, such as distance.
It’s not just about Cosmos DB. There are some good news over the horizon. There is a promise of an EF Core 3 with backward compatibility, performance improvements for LINQ, support to aggregates and AsynchEnumerables<T>, boosting search and iterations handling. Another interesting concept they are working with is the the property bag entities which will ease the implementation of MtoM relationships (with an entity in the middle) and its navigation properties as well as erasing Type Providers, types generated in design time but not preserved at runtime, this is for F#.
My only concern regarding this presentation is the aftertaste that they are working with NRDB having a relational database mindset. They talked about mapping between tables, cascade delete, etc. Something pretty similar occured eons ago when imperative elements were introduced to SQL... People can easily abuse of this commodity. Besides that, direct MtoM relationships is out of the road map, the same for bulk inserts and machine learning. Viewing the bright side, the product is maturing and Development Team is committed with end user’s feedback... so if we, as community, miss a particular feature from EF 6, letting them know is a first step in the right direction.
EF core 2.2... what's cooking?
With Diego Vega, Program Manager and Smit Patel, Software Engineer
Announcing Entity Framework Core 2.2 Preview 2 and the preview of the Cosmos DB provider and spatial extensions for EF Core - https://blogs.msdn.microsoft.com/dotnet/2018/09/12/announcing-entity-framework-core-2-2-preview-2/