Transformations.Data
2.0.0
dotnet add package Transformations.Data --version 2.0.0
NuGet\Install-Package Transformations.Data -Version 2.0.0
<PackageReference Include="Transformations.Data" Version="2.0.0" />
<PackageVersion Include="Transformations.Data" Version="2.0.0" />
<PackageReference Include="Transformations.Data" />
paket add Transformations.Data --version 2.0.0
#r "nuget: Transformations.Data, 2.0.0"
#:package Transformations.Data@2.0.0
#addin nuget:?package=Transformations.Data&version=2.0.0
#tool nuget:?package=Transformations.Data&version=2.0.0
Transformations.Data
A practical, problem-first .NET library for raw DataRow, DataReader, and SQL manipulation.
📖 Overview
Despite the rise of ORMs, enterprise architectures often drop down to raw ADO.NET for high-performance ETL syncs, reporting, and bulk pipelines. Transformations.Data wraps the harsh edges of IDataReader and DataTable with elegant, fallback-driven conversion extensions.
🚀 Why Transformations.Data?
Retrieving DBNull.Value triggers runtime crashes if not constantly checked. These extensions introduce defensive getters, parameter upserting strategies, and collection-to-table mappers, dramatically cleaning up your data access layer.
💡 Key Features & Examples
1. Resilient DataRow Fetching
Avoid index out of range and boxing cast errors with a unified generic getter that accepts explicit type conversions and fallbacks.
foreach (DataRow row in dataTable.Rows)
{
// Safely reads the value. If DBNull, missing, or mismatched, returns the fallback.
int age = row.GetValue<int>("Age", fallback: 0);
string name = row.GetValue<string>("FullName", fallback: "Unknown");
}
2. IDataReader Streamlining
Map streaming rows intuitively.
using (var reader = await command.ExecuteReaderAsync())
{
while (await reader.ReadAsync())
{
// Null safe extraction
Guid tenantId = reader.GetValue<Guid>("TenantId");
}
}
3. Sql Parameter Upserting
When dynamically building SQL command instances, ensure parameters are seamlessly updated or appended without duplicate key exceptions.
command.UpsertParameter(new SqlParameter("@LastLogin", DateTime.UtcNow));
🛠 Advanced Usage
You can convert massive IEnumerable<T> lists directly into generic DataTable instances structurally formatted for SQL Server's Table-Valued Parameters (TVPs) for bulk insertion.
📦 Dependencies
Transformations.CoreMicrosoft.Data.SqlClient
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.Data.SqlClient (>= 7.0.0)
- Transformations.Core (>= 2.0.0)
-
net8.0
- Microsoft.Data.SqlClient (>= 7.0.0)
- Transformations.Core (>= 2.0.0)
-
net9.0
- Microsoft.Data.SqlClient (>= 7.0.0)
- 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 | 115 | 4/10/2026 |