ErduranLib 1.0.101.221
dotnet add package ErduranLib --version 1.0.101.221
NuGet\Install-Package ErduranLib -Version 1.0.101.221
<PackageReference Include="ErduranLib" Version="1.0.101.221" />
<PackageVersion Include="ErduranLib" Version="1.0.101.221" />
<PackageReference Include="ErduranLib" />
paket add ErduranLib --version 1.0.101.221
#r "nuget: ErduranLib, 1.0.101.221"
#:package ErduranLib@1.0.101.221
#addin nuget:?package=ErduranLib&version=1.0.101.221
#tool nuget:?package=ErduranLib&version=1.0.101.221
ErduranLib
The "Black Box" Banking Engine - A high-performance, zero-trust .NET 10 library designed for the most critical banking and financial data lifecycles.
π Overview
ErduranLib is built on the philosophy that financial data is sacred. It acts as a "Black Box" between your application logic and the database, ensuring that every byte of data is validated, encrypted, audited, and persisted with absolute atomicity.
By leveraging the latest features of .NET 10 and C# 14, ErduranLib provides enterprise-grade performance (SIMD, Compiled Queries, Zero-Allocation Spans) while maintaining a surface API so simple an engineer can be productive in minutes.
π Key Features
π‘οΈ Guardian Pattern (Zero Data Loss)
- Persistent Journaling: Every operation is logged to a write-ahead journal before hitting the main tables. Recover from power failures or crashes with
RecoverAsync(). - Mandatory Snapshot Isolation: Automatically uses the most robust isolation levels to prevent phantom reads and race conditions.
- Idempotency Built-in: Prevents double-spending or duplicate transactions automatically via unique
TransactionIdtracking.
β‘ Extreme Performance
- Pre-Compiled Query Hot-Paths: Bypasses EF Core expression translation overhead for 2-3x faster lookups.
- SIMD/Vectorized Calculations: High-frequency financial math (sums, averages, running balances) utilizes AVX-512/AVX2 hardware acceleration.
- Zero-Allocation Logic: Massive use of
Span<T>,MemoryMarshal, and stack allocation for high-throughput scenarios.
π Enterprise Security
- Transparent Field Encryption: Protect PII and sensitive amounts with AES-256 by simply adding the
[ErduranEncrypted]attribute. - Defense-In-Depth Validation: Automated SQL Injection detection and business rule enforcement on every write.
- Immutable Auditing: Every change is cryptographically hashed and logged to an tamper-evident audit trail.
π¦ Installation
dotnet add package ErduranLib
π οΈ Quick Start
1. Simple Configuration
Configure your services with a fluent API that sets up safe defaults.
services.AddErduranLib<MyBankingContext>(options =>
{
options.EnableJournaling = true;
options.EnableAuditLogging = true;
options.WriteIsolationLevel = IsolationLevel.Snapshot;
options.EncryptionProvider = new AesEncryptionProvider("YOUR_MASTER_KEY_32_CHARS");
});
2. The Entity
Inherit from ErduranEntityBase to get auditing, concurrency, and idempotency features for free.
public class WireTransfer : ErduranEntityBase
{
[ErduranEncrypted] // Automatically encrypted in DB!
public required string SenderIban { get; set; }
public decimal Amount { get; set; }
[ErduranJson] // Stored as jsonb in PostgreSQL
public TransferMetadata Metadata { get; set; }
}
3. The "Black Box" API
Use ErduranManager to handle the entire lifecycle. You don't need try-catchβthe library returns a robust ErduranResult.
public async Task ProcessTransfer(WireTransfer transfer)
{
var result = await _manager.ProcessTransactionAsync(transfer,
validationRule: t => t.Amount > 0);
result.Match(
onSuccess: saved => Console.WriteLine($"Success! ID: {saved.Id}"),
onFailure: error => Console.WriteLine($"Error [{error.Code}]: {error.Message}")
);
}
π Performance Benchmarks
ErduranLib is optimized for high-frequency environments:
| Operation | Standard EF Core | ErduranLib (Optimized) | Improvement |
|---|---|---|---|
| Get By ID | ~12.5 ΞΌs | ~4.1 ΞΌs | 300% |
| Sum (1M decimals) | ~85 ms | ~12 ms (SIMD) | 700% |
| Batch Insert | ~120 ms | ~45 ms (Journaled) | 260% |
π§ͺ Production Readiness Checklist
Before going live, ensure:
- Master Key: Your encryption key is stored securely (Vault/KeyStore).
- PostgreSQL:
jsonbsupport is enabled if using[ErduranJson]. - Auditing: An
AuditSecretis provided for tamper-evident logs. - Recovery: A background worker calls
RecoverAsync()on startup to handle interrupted transactions.
π License
This project is licensed under the MIT License - see the LICENSE file for details.
π€ Contributing
We welcome contributions from the community! Please read our Contributing Guide to get started.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. 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. |
-
net10.0
- Microsoft.AspNetCore.DataProtection.EntityFrameworkCore (>= 10.0.0)
- Microsoft.EntityFrameworkCore (>= 10.0.0)
- Microsoft.EntityFrameworkCore.Relational (>= 10.0.0)
- Npgsql.EntityFrameworkCore.PostgreSQL (>= 10.0.0)
- System.Linq.Async (>= 6.0.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 |
|---|