Oracle.EntityFrameworkCore
8.23.80
Prefix Reserved
See the version list below for details.
dotnet add package Oracle.EntityFrameworkCore --version 8.23.80
NuGet\Install-Package Oracle.EntityFrameworkCore -Version 8.23.80
<PackageReference Include="Oracle.EntityFrameworkCore" Version="8.23.80" />
<PackageVersion Include="Oracle.EntityFrameworkCore" Version="8.23.80" />
<PackageReference Include="Oracle.EntityFrameworkCore" />
paket add Oracle.EntityFrameworkCore --version 8.23.80
#r "nuget: Oracle.EntityFrameworkCore, 8.23.80"
#addin nuget:?package=Oracle.EntityFrameworkCore&version=8.23.80
#tool nuget:?package=Oracle.EntityFrameworkCore&version=8.23.80
Oracle.EntityFrameworkCore 8.23.80
Release Notes for Oracle Entity Framework Core 8 NuGet Package
March 2025
Oracle Data Provider for .NET (ODP.NET) Entity Framework (EF) Core is a database provider that allows Entity Framework Core to be used with Oracle databases. EF Core is a cross-platform Microsoft object-relational mapper that enables .NET developers to work with relational databases using .NET objects.
This document provides information that supplements the Oracle Data Provider for .NET (ODP.NET) documentation.
Oracle .NET Links
- Oracle .NET Home Page
- GitHub - Sample Code
- ODP.NET Discussion Forum
- YouTube
- X (Twitter)
- Email Newsletter Sign Up
New Features
- Custom Reverse Engineering Template Support (Using T4 Templates)
Bug Fixes / Changes since Oracle.EntityFrameworkCore 8.23.70
- Upgrade dependency to ODP.NET 23.8.0 or higher
Tips, Limitations, and Known Issues
Code First
- The HasIndex() Fluent API cannot be invoked on an entity property that will result in a primary key in the Oracle database. Oracle Database does not support index creation for primary keys since an index is implicitly created for all primary keys.
- The HasFilter() Fluent API is not supported. For example,
modelBuilder.Entity<Blog>()
.HasIndex(b => b.Url)
.HasFilter("Url is not null");
- Data seeding using the UseIdentityColumn is not supported.
- The UseCollation() Fluent API is not supported.
- The DateOnly and TimeOnly types are not supported.
- DatabaseTable.Indexes() is not supported for descending indexes.
- The following usage is not supported because of a limitation in the provider: → HasColumnType("float").HasPrecision(38). As a workaround, set the precision value in the HasColumnType() fluent API instead of explicitly using the HasPrecision() fluent API, e.g., HasColumnType("float (38)"). NOTE: Except for 38 as a precision value, other precision values between 1 and 126 can be set using the HasPrecision() Fluent API. This limitation and workaround also apply when annotations are used instead of the above mentioned fluent API's.
Computed Columns
- Literal values used for computed columns must be encapsulated by two single-quotes. In the example below, the literal string is the comma. It needs to be surrounded by two single-quotes as shown below.
// C# - computed columns code sample
modelBuilder.Entity<Blog>()
.Property(b => b.BlogOwner)
.HasComputedColumnSql("\"LastName\" || '','' || \"FirstName\"");
Database Scalar Function Mapping
- Database scalar function mapping does not provide a native way to use functions residing within PL/SQL packages. To work around this limitation, map the package and function to an Oracle synonym, then map the synonym to the EF Core function.
LINQ
- LINQ queries that are used to query or restore historical (temporal) data are not supported.
- LINQ queries that are used to query the DateOnly and TimeOnly types are not supported.
- HasRowsAffectedReturnValue is not supported because Oracle does not support having a return value from a stored procedure. For example,
modelBuilder.Entity<Person>()
.UpdateUsingStoredProcedure(
"People_Update",
storedProcedureBuilder =>
{
storedProcedureBuilder.HasRowsAffectedReturnValue(true)
});
- Certain LINQs cannot be executed against Oracle Database 21c or lower. Let us first imagine an entity model with the following entity:
public class MyTable
{
public int Id { get; set; }
public int? Value { get; set; }
}
The following LINQ will not work against Oracle Database 21c or lower:
var query = from t in context.Table
group t.Id by t.Value
into tg
select new
{
A = tg.Key,
B = context.Table.Where(t => t.Value == tg.Max() * 6).Max(t => (int?)t.Id)
};
This is due to LINQ creating the following SQL query:
SELECT "t"."Value" "A", "t"."Id", (
SELECT MAX("t0"."Id")
FROM "MyTable" "t0"
WHERE (("t0"."Value" = "t"."Id") OR ("t0"."Value" IS NULL AND MAX("t"."Id") IS NULL))) "B"
FROM "MyTable" "t"
GROUP BY "t"."Value"
The issue is because the inner select query uses a MAX function which refers to a column from the outer select query. Also the way in which the MAX function is used within the WHERE clause is not supported in Oracle Database. The same issue is also applicable when the MIN function is used.
- Oracle DB doesn't support UPDATE queries with FROM clause in DB 21c or lower. So certain LINQs cannot be executed against Oracle Database which generate UPDATE query with FROM clause. For example, imagine an entity model with the following entities:
public class Blog
{
public int Id { get; private set; }
public string Name { get; set; }
public List<Post> Posts { get; } = new();
}
public class Post
{
public int Id { get; private set; }
public string Title { get; set; }
public string Content { get; set; }
public DateTime PublishedOn { get; set; }
}
Trying to update the Blog.Name using below LINQ would throw 'ORA-00933: SQL command not properly ended'
var query = from blog in context.Set<Blog>().Where(c => c.Name == "MyBlog")
join post in context.Set<Post>().Where(p => p.Title == "Oracle")
on blog.Name equals post.Title
select new { blog, post };
var updateQuery = query.ExecuteUpdate(s => s.SetProperty(c => c.blog.Name, "Updated"));
This is due to LINQ creating the following SQL query, which Oracle database does not support.
UPDATE "Blogs" "b"
SET "b"."Name" = N'Updated'
FROM (
SELECT "p"."Id", "p"."BlogId", "p"."Content", "p"."PublishedOn", "p"."Title"
FROM "Posts" "p"
WHERE "p"."Title" = N'Oracle') "t"
WHERE (("b"."Name" = "t"."Title") AND ("b"."Name" = N'MyBlog'))
- The PL/SQL returned by ToQueryString() does not execute successfully if the input to the LINQ query contains a TimeSpan. This is because in PL/SQL, interval value with precision is not accepted. Consider this example, imagine an entity model with the following entity:
public class Author
{
public int Id { get; set; }
public string Name { get; set; }
public DateTimeOffset Timeline { get; set; }
}
The following LINQ will not work:
var timeSpan = new TimeSpan(1000);
var authorsInChigley1 = context.Authors.Where(e => e.Timeline > DateTimeOffset.Now - timeSpan).ToQueryString();
Following is the PL/SQL that gets generated.
DECLARE
l_sql varchar2(32767);
l_cur pls_integer;
l_execute pls_integer;
BEGIN
l_cur := dbms_sql.open_cursor;
l_sql := 'SELECT "a"."Id", "a"."Name", "a"."Timeline"
FROM "Authors" "a"
WHERE "a"."Timeline" > (SYSDATE - :timeSpan_0)';
dbms_sql.parse(l_cur, l_sql, dbms_sql.native);
dbms_sql.bind_variable(l_cur, ':timeSpan_0', INTERVAL '0 0:0:0.0001000' DAY(8) TO SECOND(7));
l_execute:= dbms_sql.execute(l_cur);
dbms_sql.return_result(l_cur);
END;
Scaffolding
- ORA-50607 or similar error occurs when a table has multiple identity and/or sequence/trigger columns auto-generated. While scaffolding such a table, the .NET model generated contains the ValueGeneratedOnAdd fluent API for all the auto-generated columns. When executing a LINQ query on this table, an ORA-50607 or similar error is thrown that indicates only one identity column per table is allowed. As a workaround for column values generated by a sequence/trigger, replace the ValueGeneratedOnAdd() fluent API appended to the corresponding property/column with UseSequence(your sequence name). The sequence name is the Oracle database sequence name from which the column gets its value.
- Scaffolding a table that uses Function Based Indexes is supported. However, the index will NOT be scaffolded.
- Scaffolding a table that uses Conditional Indexes is not supported.
Sequences
- A sequence cannot be restarted.
- Extension methods related to SequenceHiLo is not supported, except for columns with Char, UInt, ULong, and UByte data types.
Copyright (c) 2025, Oracle and/or its affiliates.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. |
-
net8.0
- Microsoft.EntityFrameworkCore.Relational (>= 8.0.11 && < 9.0.0)
- Oracle.ManagedDataAccess.Core (>= 23.8.0 && < 24.0.0)
NuGet packages (199)
Showing the top 5 NuGet packages that depend on Oracle.EntityFrameworkCore:
Package | Downloads |
---|---|
FenixAlliance.ACL.Dependencies
Application Component for the Alliance Business Suite. |
|
WalkingTec.Mvvm.Core
WalkingTec.Mvvm |
|
MPACKAGE.LibData.Oracle
Package Description |
|
HanaTech.Framework.Dapper
Package Description |
|
devprime.stack.state
DevPrime State |
GitHub repositories (27)
Showing the top 20 popular GitHub repositories that depend on Oracle.EntityFrameworkCore:
Repository | Stars |
---|---|
abpframework/abp
Open-source web application framework for ASP.NET Core! Offers an opinionated architecture to build enterprise software solutions with best practices on top of the .NET. Provides the fundamental infrastructure, cross-cutting-concern implementations, startup templates, application modules, UI themes, tooling and documentation.
|
|
elsa-workflows/elsa-core
A .NET workflows library
|
|
danielgerlag/workflow-core
Lightweight workflow engine for .NET Standard
|
|
dotnetcore/Util
Util是一个.Net平台下的应用框架,旨在提升中小团队的开发能力,由工具类、分层架构基类、Ui组件,配套代码生成模板,权限等组成。
|
|
dotnet/aspire
Tools, templates, and packages to accelerate building observable, production-ready apps
|
|
dotnetcore/WTM
Use WTM to write .netcore app fast !!!
|
|
cq-panda/Vue.NetCore
(已支持sqlsugar).NetCore、.Net6、Vue2、Vue3、Vite、TypeScript、Element plus+uniapp前后端分离,全自动生成代码;支持移动端(ios/android/h5/微信小程序。http://www.volcore.xyz/
|
|
borisdj/EFCore.BulkExtensions
Entity Framework EF Core efcore Bulk Batch Extensions with BulkCopy in .Net for Insert Update Delete Read (CRUD), Truncate and SaveChanges operations on SQL Server, PostgreSQL, MySQL, SQLite, Oracle
|
|
dotnetcore/osharp
OSharp是一个基于.Net6.0的快速开发框架,框架对 AspNetCore 的配置、依赖注入、日志、缓存、实体框架、Mvc(WebApi)、身份认证、功能权限、数据权限等模块进行更高一级的自动化封装,并规范了一套业务实现的代码结构与操作流程,使 .Net 框架更易于应用到实际项目开发中。
|
|
ErikEJ/EFCorePowerTools
Entity Framework Core Power Tools - reverse engineering, migrations and model visualization in Visual Studio & CLI
|
|
Giorgi/EntityFramework.Exceptions
Strongly typed exceptions for Entity Framework Core. Supports SQLServer, PostgreSQL, SQLite, Oracle and MySql.
|
|
dotnetcore/sharding-core
high performance lightweight solution for efcore sharding table and sharding database support read-write-separation .一款ef-core下高性能、轻量级针对分表分库读写分离的解决方案,具有零依赖、零学习成本、零业务代码入侵
|
|
IoTSharp/IoTSharp
IoTSharp is an open-source IoT platform for data collection, processing, visualization, and device management.
|
|
optimajet/WorkflowEngine.NET
WorkflowEngine.NET - component that adds workflow in your application. It can be fully integrated into your application, or be in the form of a specific service (such as a web service).
|
|
bing-framework/Bing.NetCore
Bing是基于 .net core 3.1 的框架,旨在提升团队的开发输出能力,由常用公共操作类(工具类、帮助类)、分层架构基类,第三方组件封装,第三方业务接口封装等组成。
|
|
iioter/iotgateway
A cross-platform IoT gateway based on .net8. Through visual configuration, you can easily connect to any of your devices and systems (such as PLC, barcode scanner, CNC, database, serial device, host computer, OPC Server, OPC UA Server, Mqtt Server, etc.), so as to interact with Thingsboard, IoTSharp or Your own IoT platform for two-way data communi
|
|
VictorTzeng/Zxw.Framework.NetCore
基于EF Core的Code First模式的DotNetCore快速开发框架,其中包括DBContext、IOC组件autofac和AspectCore.Injector、代码生成器(也支持DB First)、基于AspectCore的memcache和Redis缓存组件,以及基于ICanPay的支付库和一些日常用的方法和扩展,比如批量插入、更新、删除以及触发器支持,当然还有demo。欢迎提交各种建议、意见和pr~
|
|
masastack/MASA.Framework
.NET next-generation microservice development framework, which provides cloud native best practices based on Dapr.
|
|
Coldairarrow/EFCore.Sharding
Database Sharding For EFCore
|
|
yangzhongke/Zack.EFCore.Batch
Deleting or Updating multiple records from a LINQ Query in a SQL statement without loading entities
|
Version | Downloads | Last updated |
---|---|---|
9.23.80 | 5,965 | 8 days ago |
9.23.60 | 238,381 | 4 months ago |
8.23.80 | 2,376 | 8 days ago |
8.23.70 | 187,043 | 4 months ago |
8.23.60 | 459,738 | 6 months ago |
8.23.50 | 430,796 | 9 months ago |
8.23.40 | 400,003 | 5/2/2024 |
8.21.180 | 388 | 8 days ago |
8.21.170 | 15,871 | 4 months ago |
8.21.160 | 28,494 | 6 months ago |
8.21.150 | 52,963 | 9 months ago |
8.21.140 | 283,607 | 4/11/2024 |
8.21.121 | 840,039 | 12/8/2023 |
7.21.13 | 389,431 | 1/1/2024 |
7.21.12 | 526,022 | 10/9/2023 |
7.21.11 | 512,256 | 7/25/2023 |
7.21.9 | 1,140,379 | 1/19/2023 |
7.21.8 | 234,691 | 12/19/2022 |
6.21.170 | 7,281 | 4 months ago |
6.21.160 | 28,056 | 6 months ago |
6.21.150 | 24,876 | 9 months ago |
6.21.140 | 62,397 | 4/11/2024 |
6.21.130 | 216,564 | 1/1/2024 |
6.21.120 | 108,307 | 10/9/2023 |
6.21.110 | 92,694 | 7/25/2023 |
6.21.90 | 468,517 | 1/19/2023 |
6.21.61 | 2,178,185 | 5/4/2022 |
6.21.5 | 1,068,810 | 1/4/2022 |
6.21.4 | 291,740 | 12/7/2021 |
5.21.90 | 84,268 | 1/19/2023 |
5.21.61 | 127,919 | 5/4/2022 |
5.21.5 | 205,076 | 1/4/2022 |
5.21.4 | 319,819 | 10/27/2021 |
5.21.1 | 1,051,479 | 2/12/2021 |
3.21.90 | 31,565 | 1/19/2023 |
3.21.61 | 57,283 | 5/4/2022 |
3.21.5 | 87,195 | 1/4/2022 |
3.21.4 | 36,427 | 10/27/2021 |
3.19.180 | 34,405 | 2/3/2023 |
3.19.130 | 131,510 | 10/8/2021 |
3.19.110 | 152,504 | 3/31/2021 |
3.19.80 | 1,270,647 | 9/8/2020 |
2.19.180 | 7,539 | 2/3/2023 |
2.19.110 | 26,981 | 3/31/2021 |
2.19.90 | 109,642 | 9/8/2020 |
2.19.80 | 167,114 | 7/9/2020 |
2.19.70 | 210,364 | 5/1/2020 |
2.19.60 | 577,974 | 12/6/2019 |
2.19.50 | 152,353 | 10/16/2019 |
2.19.30 | 544,836 | 7/24/2019 |