Oracle Entity Framework Core 9 Features
Oracle supports the EF Core 9 features described on this page. This page notes the differences from standard EF Core 9 functionality and Oracle's support.
More details about each of these features standard functionality are described on the What's New in EF Core 9 web page.
Vector Similarity Search
Oracle EF Core 9 supports VectorDistance
, VectorEmbedding
, and ToVector
EF functions with dense Oracle Database vectors. Default vector type mappings change from .NET string to primitive array types.
Starting with Oracle EF Core 23.8, Oracle Database sparse vectors are supported as well. This release also supports a native OracleVector
provider type for dense vectors and OracleSparseVector
provider type for sparse vectors for use with EF Core.
Complex types: GroupBy and ExecuteUpdate
Complex types gain new Oracle EF Core support in two ways: grouping by a complex type instance and updating by using ExecuteUpdate
.
Prune Unneeded SQL Elements
In earlier EF Core releases, generated SQL contained unnecessary elements. Oracle EF Core 9 prunes these unnecessary tables and projection columns. This results in more compact and sometimes more efficient SQL.
In table pruning, unneeded tables in SQL JOINs are removed.
In projection pruning, unneeded projection columns in subqueries are eliminated.
Force or Prevent Query Parameterization
Oracle EF Core can use the EF.Constant or EF.Parameter methods to direct the generated query to use a parameter value (EF.Constant
) or parameter variable (EF.Parameter
). Oracle EF Core 9 introduces EF.Parameter
support.
Inlined Uncorrelated Subqueries
In EF Core 8, an IQueryable
interface referenced in another LINQ is executed in a separate database round trip. This results in multiple round trips and slows performance.
Oracle EF Core 9 enables the sub-query (IQueryable
) and the LINQ executions in a single round trip.
Queries Using Count != 0 Optimization
In Oracle EF Core 8, LINQ queries could be translated to use the SQL COUNT
function. In EF Core 9, these LINQ queries will use the more efficient SQL EXISTS.
New ToHashSetAsync<T> Methods
Oracle EF Core adds an asynchronous version of Enumerable.ToHashSet<T>
. This method returns query results as a HashSet.
Improved Data Seeding
Oracle EF Core has an easy way to populate a database with an initial data set. This is known as data seeding. DbContextOptionsBuilder
introduces new UseSeeding
and UseAsyncSeeding
methods that are executed when the DbContext
initializes during an EnsureCreated
or EnsureCreatedAsync
operation.
Auto-Compiled Models and MSBuild Integration
Compiled EF Core models enhance app startup time for large models with hundreds of entity types. Previously, compiled models were generated manually using the command line. EF Core then was directed to use them with the UseModel
method.
Oracle EF Core 9 can detect and use compiled models automatically, eliminating the need for UseModel
. Moreover, if entity types or DbContext
are changed, MSBuild
automatically updates the compiled model when the model project is built.
Make Existing Model Building Conventions More Extensible
Oracle EF Core 9 makes it easier to extend some of the public model-building conventions, such as the property mapping code.
Update ApplyConfigurationsFromAssembly to Call Non-Public Constructors
The ApplyConfigurationsFromAssembly
method can now be instantiated from a non-public constructor, as well as the public, parameterless form of this constructor has improved error messages during failed instantiations.
Not Supported Features
The Oracle EF Core 9 provider does not support the following features:
-
Protection against concurrent migrations, also known as database lock during migrations
-
Read-only primitive collections
See Also:
-
Database Functions (EF.Functions) for Vectors to learn more about Vector Similarity Search.
-
Update ApplyConfigurationsFromAssembly to call non-public constructors