LokiBulkDataProcessor 7.0.0

dotnet add package LokiBulkDataProcessor --version 7.0.0
                    
NuGet\Install-Package LokiBulkDataProcessor -Version 7.0.0
                    
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="LokiBulkDataProcessor" Version="7.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="LokiBulkDataProcessor" Version="7.0.0" />
                    
Directory.Packages.props
<PackageReference Include="LokiBulkDataProcessor" />
                    
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 LokiBulkDataProcessor --version 7.0.0
                    
#r "nuget: LokiBulkDataProcessor, 7.0.0"
                    
#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 LokiBulkDataProcessor@7.0.0
                    
#: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=LokiBulkDataProcessor&version=7.0.0
                    
Install as a Cake Addin
#tool nuget:?package=LokiBulkDataProcessor&version=7.0.0
                    
Install as a Cake Tool

⚠️ Important Notice (v7.0.0)
This release includes a critical bug fix for Web API environments.
Previous versions (≤ 6.x) failed after the first execution unless the app was restarted.
Please upgrade to v7.0.0+ for reliable multi-execution support.

Loki Bulk Data Processor

The Loki Bulk Data Processor is a fast, efficient .NET library for bulk data inserts into SQL Server using SqlBulkCopy. Designed for ASP.NET Core, it supports:

  • IEnumerable<T> models
  • DataTable
  • IDataReader (v6.0.0+)
  • JSON streams (v6.0.0+)
  • Structured logging and mapping support (v6.0.0+)

Perfect for high-throughput ETL pipelines and real-time ingestion scenarios.


Install

  dotnet add package LokiBulkDataProcessor

Performance

Benchmark: 100,000 records inserted into an empty SQL Server table with 4 columns (1 primary key, 1 foreign key), on a 2.7GHz i7, 16 GB RAM, SSD.

Method Time Taken Memory Usage
Loki Bulk Processor 2.99 seconds 266 MB
Entity Framework Core 68.74 seconds 1 GB+

Inserted 100,000 records into an empty table with 1 PK and 1 FK column.

⚠️ Entity Framework was used with AddAsync and SaveChangesAsync. Loki used a single bulk insert call.

Upgrade Guide

From Version What Changed Action Required
≤ 6.0.0 Web API execution failed after the first request Upgrade to v7.0.0+
6.0.0 DataTableMapping renamed to DataMapping Update references ⚠️

Documentation

Everything you need to get started:

Support

If this library saved you time or made your life easier, consider showing your support:

Every bit helps keep the project going.

Product 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.  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
7.0.0 0 7/19/2025
6.0.0 134 7/7/2025
5.0.1 117 1/26/2025
4.0.1 171 2/15/2024
4.0.0 444 11/5/2022
3.5.1 536 9/30/2020
3.5.0 508 6/21/2020
3.0.0 554 4/7/2020
2.0.3 530 3/8/2020
2.0.1 725 3/8/2020
2.0.0 735 3/8/2020
1.0.2 971 2/8/2020 1.0.2 is deprecated because it has critical bugs.

⚠️ Critical Bug Fix: LokiBulkDataProcessor is now safe for consecutive executions in ASP.NET Core Web APIs.
 Previously, only the first execution succeeded unless the app was restarted. Thanks to new internal handling, this limitation is resolved.

 🆕 Improvements:
 - SaveAsync methods for IDataReaders and JsonStreams
 - Structured logging for better observability

 🔧 Breaking Change:
 - Renamed DataTableMapping to DataMapping

 This update represents a major reliability milestone. If you rely on Web API scenarios, upgrade as soon as possible.