Transformations.EntityFramework
2.0.0
dotnet add package Transformations.EntityFramework --version 2.0.0
NuGet\Install-Package Transformations.EntityFramework -Version 2.0.0
<PackageReference Include="Transformations.EntityFramework" Version="2.0.0" />
<PackageVersion Include="Transformations.EntityFramework" Version="2.0.0" />
<PackageReference Include="Transformations.EntityFramework" />
paket add Transformations.EntityFramework --version 2.0.0
#r "nuget: Transformations.EntityFramework, 2.0.0"
#:package Transformations.EntityFramework@2.0.0
#addin nuget:?package=Transformations.EntityFramework&version=2.0.0
#tool nuget:?package=Transformations.EntityFramework&version=2.0.0
Transformations.EntityFramework
A practical, problem-first .NET library for resilient EF Core workflows.
📖 Overview
Transformations.EntityFramework equips standard DbContext instances with enterprise-grade resilience wrappers and built-in audit extraction utilities. Save transactions safely across volatile cloud connections, extract modified properties for history tables, and export datasets natively.
🚀 Why Transformations.EntityFramework?
Entity Framework Core is powerful, but extracting audit trails (added/modified/deleted entities) usually requires heavy custom overrides of SaveChanges. Furthermore, transient connectivity drops require specific strategy implementations. These helpers inject ready-to-use solutions into any standard EF context.
💡 Key Features & Examples
1. Resilient DB Commits
Automatically wrap your SaveChanges logic to handle database timeouts and concurrency conflicts seamlessly.
// Will attempt the transaction up to 4 times with an exponential backoff curve
int rowsAffected = await dbContext.SaveChangesWithRetryAsync(
retryCount: 4,
initialDelay: TimeSpan.FromMilliseconds(250)
);
2. ChangeTracker Audit Interception
If you need to construct a robust history log prior to saving, simply ask the extension method for the exact data deltas.
// Pulls all modified entities of a specific type (or any type) matching the EF Modified state
var modifiedUsers = dbContext.GetModifiedEntities<User>();
foreach (var audit in modifiedUsers)
{
Console.WriteLine($"User {audit.Id} was updated.");
// Evaluate original vs current values from EF's Property entries
}
3. Native IQueryable to CSV
Export server-side tables directly to CSV formats without manually iterating loops.
// Streams data into a cleanly formatted CSV string buffer
string csvPayload = await dbContext.Users
.Where(u => u.IsActive)
.ToCsvStringAsync();
🛠 Advanced Usage
The resilience wrappers can be paired with custom CancellationToken injections, allowing long-running retries to gracefully terminate if the parent HTTP request is cancelled.
📦 Dependencies
Transformations.CoreMicrosoft.EntityFrameworkCore
Part of the Transformations ecosystem. Designed for modern .NET 8+.
| 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 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 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.EntityFrameworkCore (>= 9.0.7)
- Transformations.Core (>= 2.0.0)
-
net8.0
- Microsoft.EntityFrameworkCore (>= 9.0.7)
- Transformations.Core (>= 2.0.0)
-
net9.0
- Microsoft.EntityFrameworkCore (>= 9.0.7)
- Transformations.Core (>= 2.0.0)
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 |
|---|---|---|
| 2.0.0 | 109 | 4/10/2026 |