BulkInsertExtension.Oracle 0.0.1

dotnet add package BulkInsertExtension.Oracle --version 0.0.1
                    
NuGet\Install-Package BulkInsertExtension.Oracle -Version 0.0.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="BulkInsertExtension.Oracle" Version="0.0.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="BulkInsertExtension.Oracle" Version="0.0.1" />
                    
Directory.Packages.props
<PackageReference Include="BulkInsertExtension.Oracle" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add BulkInsertExtension.Oracle --version 0.0.1
                    
#r "nuget: BulkInsertExtension.Oracle, 0.0.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package BulkInsertExtension.Oracle@0.0.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=BulkInsertExtension.Oracle&version=0.0.1
                    
Install as a Cake Addin
#tool nuget:?package=BulkInsertExtension.Oracle&version=0.0.1
                    
Install as a Cake Tool

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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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