Transformations.EntityFramework 2.0.0

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

Transformations.EntityFramework

A practical, problem-first .NET library for resilient EF Core workflows.

NuGet

📖 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.Core
  • Microsoft.EntityFrameworkCore

Part of the Transformations ecosystem. Designed for modern .NET 8+.

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 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. 
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
2.0.0 109 4/10/2026