LokiBulkDataProcessor 7.0.1
dotnet add package LokiBulkDataProcessor --version 7.0.1
NuGet\Install-Package LokiBulkDataProcessor -Version 7.0.1
<PackageReference Include="LokiBulkDataProcessor" Version="7.0.1" />
<PackageVersion Include="LokiBulkDataProcessor" Version="7.0.1" />
<PackageReference Include="LokiBulkDataProcessor" />
paket add LokiBulkDataProcessor --version 7.0.1
#r "nuget: LokiBulkDataProcessor, 7.0.1"
#:package LokiBulkDataProcessor@7.0.1
#addin nuget:?package=LokiBulkDataProcessor&version=7.0.1
#tool nuget:?package=LokiBulkDataProcessor&version=7.0.1
⚠️ 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>modelsDataTableIDataReader(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
AddAsyncandSaveChangesAsync. 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:
- 📝 Full Documentation (Wiki)
- 📺 YouTube Tutorial – Part 1 — Introduction & Setup
- 📺 YouTube Tutorial – Part 2 — Advanced Usage & Mapping
- 🧪 Example Projects on GitHub
Support
If this library saved you time or made your life easier, consider showing your support:
- ☕ Buy me a coffee
- ⭐ Star the GitHub repo to help others discover it
- 🗣️ Share your experience or contribute feedback via issues
Every bit helps keep the project going.
| 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. 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. |
-
net8.0
- FastMember (>= 1.5.0)
- Microsoft.Extensions.DependencyInjection (>= 8.0.1)
- Microsoft.Extensions.Logging (>= 8.0.1)
- Microsoft.Extensions.Logging.Console (>= 8.0.1)
- System.Data.SqlClient (>= 4.8.6)
- Testcontainers.MsSql (>= 4.1.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Fixed a compatibility issue with Azure Functions where synchronous stream parsing caused a System.InvalidOperationException. Replaced JsonDocument.Parse with JsonDocument.ParseAsync in BulkProcessor.SaveAsync to comply with async I/O requirements. Refactored JsonDataReader to accept a pre-parsed JsonDocument, improving separation of concerns and stream lifecycle control. These changes enhance hosting compatibility and align with ASP.NET Core best practices.