BulkInsertExtension.Oracle
0.0.1
dotnet add package BulkInsertExtension.Oracle --version 0.0.1
NuGet\Install-Package BulkInsertExtension.Oracle -Version 0.0.1
<PackageReference Include="BulkInsertExtension.Oracle" Version="0.0.1" />
<PackageVersion Include="BulkInsertExtension.Oracle" Version="0.0.1" />
<PackageReference Include="BulkInsertExtension.Oracle" />
paket add BulkInsertExtension.Oracle --version 0.0.1
#r "nuget: BulkInsertExtension.Oracle, 0.0.1"
#:package BulkInsertExtension.Oracle@0.0.1
#addin nuget:?package=BulkInsertExtension.Oracle&version=0.0.1
#tool nuget:?package=BulkInsertExtension.Oracle&version=0.0.1
Oracle.BulkInsertExtension
High-performance bulk insert extension for Oracle using Private Temporary Tables (PTT) with Entity Framework Core and ODP.NET. This library is designed to achieve fast, reliable inserts with identity read-back and optional child entity support.
Features
Bulk insert with Private Temporary Tables (PTT)
Support for Entity Framework Core metadata
Identity key read-back and automatic child foreign key updates
Parallel DML and APPEND insert hints for maximum performance
Optional field encryption and audit hooks
Clean-up of temporary GUID markers after insert
Process Overview
Entity preparation – Entities are pre-processed (encryption, audit, metadata discovery).
Private Temporary Table creation – A session-scoped PTT is created dynamically for the insert operation.
Data staging – Entities are loaded into the PTT via array binding for maximum throughput.
Bulk insert – A single INSERT /*+ APPEND PARALLEL */ ... SELECT statement moves data from the PTT into the target table.
Identity retrieval – Newly generated identity values are read back and mapped to in-memory entities.
Child updates – Child collections (if any) are updated with parent keys before optional bulk insert.
Cleanup – Temporary GUID markers are cleared and the PTT is automatically dropped at session end.
This design avoids row-by-row inserts and leverages Oracle’s direct path and parallel DML capabilities.
Installation dotnet add package Oracle.BulkInsertExtension
Usage using (var context = new MyDbContext()) using (var conn = new OracleConnection(context.Database.GetConnectionString())) { await BulkPttRunner.BulkInsertWithPrivateTempAsync( context, conn, myEntities, new BulkInsertWithPrivateTempOptions { SchemaFallback = "MYSCHEMA", DegreeOfParallelism = 4, EncryptFields = true, Encryptor = (entity, db) ⇒ EncryptEntity(entity), ApplyAudit = (entity, db) ⇒ ApplyAuditFields(entity) }, CancellationToken.None ); }
Options
SchemaFallback – fallback schema when EF metadata does not specify one
DegreeOfParallelism – controls Oracle parallel insert hint
EncryptFields / Encryptor – optional encryption logic
ApplyAudit – optional audit hook before insert
ConnectionFactory – custom OracleConnection factory
Requirements
.NET 9.0 or later
Entity Framework Core 9.0+
Oracle.ManagedDataAccess.Core 23.9+
Oracle Database 18c or newer (PTT support required)
License
MIT License.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net9.0 is compatible. 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. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net9.0
- Microsoft.EntityFrameworkCore (>= 9.0.8)
- Microsoft.EntityFrameworkCore.Relational (>= 9.0.8)
- Oracle.ManagedDataAccess.Core (>= 23.9.1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last Updated |
---|---|---|
0.0.1 | 57 | 9/7/2025 |