SQLStoredProcedureCommandsFunctions 1.0.1
dotnet add package SQLStoredProcedureCommandsFunctions --version 1.0.1
NuGet\Install-Package SQLStoredProcedureCommandsFunctions -Version 1.0.1
<PackageReference Include="SQLStoredProcedureCommandsFunctions" Version="1.0.1" />
<PackageVersion Include="SQLStoredProcedureCommandsFunctions" Version="1.0.1" />
<PackageReference Include="SQLStoredProcedureCommandsFunctions" />
paket add SQLStoredProcedureCommandsFunctions --version 1.0.1
#r "nuget: SQLStoredProcedureCommandsFunctions, 1.0.1"
#:package SQLStoredProcedureCommandsFunctions@1.0.1
#addin nuget:?package=SQLStoredProcedureCommandsFunctions&version=1.0.1
#tool nuget:?package=SQLStoredProcedureCommandsFunctions&version=1.0.1
SQLStoredProcedureCommandsFunctions 1.0.1.0
A lightweight yet powerful SQL Server data-access library that simplifies working with stored procedures, DataTables, SQL parameters, and Azure SQL authentication.
Built for .NET 10 enterprise applications requiring clean, reusable, and high-performance database access.
π Features
β Azure SQL Authentication (Managed Identity Ready)
- Environment-aware token generation
- Local:
VisualStudioCredential - Cloud:
DefaultAzureCredential - Automatic AccessToken injection into
SqlConnection - Zero code changes required when deploying to Azure
β Full Data Access Layer (DAL)
Rich APIs for executing SQL commands:
ExecuteNonQueryExecuteScalarExecuteDatasetExecuteReaderExecuteXmlReader
Supports:
- sync & async programming
- Connection string, SqlConnection, or SqlTransaction
- Stored procedures or raw SQL
- Automatic command preparation
β Stored Procedure Parameter Caching
- Automatically discovers stored procedure parameters
- Caches them using synchronized hashtable
- Fast repeated execution
- Eliminates
DeriveParametersoverhead
β SQL Parameter Utilities
- Convert C# classes β SqlParameter list
[IgnoreDBParameter]attribute to skip properties- Automatic SqlDbType inference
- Create strongly typed parameters easily
β Data Conversion Helpers
DataTableβList<T>/IEnumerable<T>List<T>/IEnumerable<T>βDataTableDataSet/DataTableβDictionary- Column reordering & shifting utilities
β Legacy-style SqlHelper (Optional)
- Transaction support
- Bulk SP execution
- Dataset update utilities
π¦ Installation
Install from NuGet:
dotnet add package SQLStoredProcedureCommandsFunctions --version 1.0.1.0
| 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.Data.SqlClient (>= 6.1.3)
- Microsoft.Extensions.Configuration (>= 10.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.
Release Notes - v1.0.1.0
β¨ Key Features
🔹 1. Azure SQL Authentication
Added AzureCredential helper with environment-aware token resolution.
Supports:
Local development via VisualStudioCredential
Cloud environments via DefaultAzureCredential
Automatic access token generation for SQL connections.
(Files: AzureCredential.cs)
2. High-Performance Stored Procedure Execution
Execute NonQuery, Scalar, Reader, Dataset, XmlReader operations.
Full support for sync and async methods.
Overloads for:
Raw SQL commands
Stored procedure name
Parameter arrays
Strongly-typed object parameters
3. Built-In Transaction Support
Easy transaction lifecycle management:
InitializeTransaction()
Commit()
Rollback()
Safe handling of shared connections.
4. Automatic SQL Parameter Discovery & Caching
SQLHelperParameterCache creates and caches stored procedure parameter sets.
Avoids repeated trips to SQL Server using DeriveParameters.
Provides deep clones to ensure thread-safety.
5. Object-to-SQL Parameter Mapping
SQLParamHelper allows:
Auto-generation of SqlParameter list from an object.
Support for numeric, string, GUID, datetime, boolean, and other primitives.
Attribute [IgnoreDbParameter] to omit properties from mapping.
6. DataSet & DataTable Conversion Utilities
Included in DataAccessConverter, offering:
Convert:
DataTable β List<T>
DataTable β IEnumerable<T>
DataSet β Dictionary<string, List<object>>
List<T> β DataTable
Multiple lists β DataSet
Advanced helpers:
Select distinct values
Shift column ordering
Move/rename table columns
7. Extension Methods for DataTable Manipulations
Included in DataTableExtensions:
Move one or more columns to specific indices.
Get column names by index.
Reorder columns without breaking row data.
8. Streamlined Data Access Layer
The DataAccessLayer class provides a clean API for:
Sync/async CRUD operations
Command preparation
Reader handling
Strong validation for:
Connection state
Null parameters
Argument correctness
🔧 Internal Enhancements
Safe cloning of SQL parameters before execution.
Consistent use of CommandTimeout for long-running procedures.
Support for both internal and external connection ownership modes.
Uses Microsoft.Data.SqlClient for modern SQL Server connectivity.
🐛 Known Limitations
Does not support Dapper-style automatic mapping (future enhancement possible).
SQL bulk copy not included in this version.
Parameter type inference follows simplified rules and may need extension for complex
types.
📦 Target Frameworks
.NET 10
📘 Documentation
For full samples, including:
CRUD examples
Async patterns
Stored procedure patterns
Mapping examples