Oracle Entity Framework Core 8 Features
Oracle supports the EF Core 8 features described on this page. This page notes the differences from standard EF Core 8 functionality and Oracle's support.
More details about each of these features standard functionality are described on the What's New in EF Core 8.0 web page.
JSON Columns
Oracle database includes comprehensive JSON document and column support, including binary JSON storage and JSON Relational Duality.
EF Core provides support for JSON columns that allows the mapping and modifying of aggregates built from .NET types to JSON documents. LINQ queries can act upon the aggregates, which will translate to the necessary query constructs to perform operations on the JSON.
Oracle EF Core 8 JSON column support includes:
-
JSON column mapping
-
Queries into JSON columns
-
JSON column data updates
-
Translate element access into JSON arrays
Oracle Database 21c and higher support JSON columns. Oracle EF Core 8 will map aggregate types to NCLOB columns instead of JSON columns when connected to earlier Oracle database versions.
Math Translations
Concrete .NET types, such as double and float, recently introduced generic math interfaces. They mirrored existing functionality in .NET Math
and MathF
classes.
Oracle EF Core 8 translates calls to these generic math APIs in LINQ using existing Oracle SQL translations for Math
and MathF
. Developers can choose between math APIs, such as either Math.Sin
or double.Sin
.
Oracle EF Core support all math translations except for DegreesToRadians
and RadiansToDegrees
.
Value Objects Using Complex Types
Oracle EF Core 8 support complex types, also known as object types. They are structured to hold multiple values, such as an address.
Complex types must be configured in the model using either mapping attributes "[ComplexType]"
or by calling the "ComplexProperty"
API in OnModelCreating
.
Complex types do not map to their own tables. Instead, they are saved inline to the table columns. This matches the table sharing behavior of owned types.
Model Building - Discriminator Columns Maximum Length
In Oracle EF Core 8, string discriminator columns in table-per-hierarchy inheritance mapping are now configured with a maximum length. This length is calculated as the smallest Fibonacci number covering all defined discriminator values.
Raw SQL Queries for Unmapped Types
Oracle EF Core 8 has added raw SQL queries returning any mappable CLR type, without including that type in the EF model. Queries using unmapped types are executed using SqlQuery
or SqlQueryRaw
.
Lazy-Loading Enhancements
Oracle EF Core 8 adds the following lazy-loading features:
-
Lazy-loading for no-tracking queries
-
Explicit loading from untracked entities
-
Opt-out of lazy-loading for specific navigations
Access to Tracked Entities
Oracle EF Core 8 supports new APIs for applications to lookup tracked entities by their primary, alternate, or foreign key. These APIs are accessed through the LocalView<TEntity>
of the entity type.
Not Supported Features
The following feature is not supported by the Oracle EF Core 8 provider:
-
Primitive Collections