SQLStoredProcedureCommandsFunctions 1.0.0.3
dotnet add package SQLStoredProcedureCommandsFunctions --version 1.0.0.3
NuGet\Install-Package SQLStoredProcedureCommandsFunctions -Version 1.0.0.3
<PackageReference Include="SQLStoredProcedureCommandsFunctions" Version="1.0.0.3" />
paket add SQLStoredProcedureCommandsFunctions --version 1.0.0.3
#r "nuget: SQLStoredProcedureCommandsFunctions, 1.0.0.3"
// Install SQLStoredProcedureCommandsFunctions as a Cake Addin #addin nuget:?package=SQLStoredProcedureCommandsFunctions&version=1.0.0.3 // Install SQLStoredProcedureCommandsFunctions as a Cake Tool #tool nuget:?package=SQLStoredProcedureCommandsFunctions&version=1.0.0.3
SQL Stored Procedure Utility Library
Overview
This library simplifies the execution of SQL stored procedures and provides easy-to-use methods for converting DataSet objects to strongly-typed lists or class objects. It supports both synchronous and asynchronous operations, making it a versatile tool for working with databases in .NET applications.
Features
ExecuteDataset: Executes a stored procedure and returns a DataSet.
ExecuteDatasetAsync: Executes a stored procedure asynchronously and returns a DataSet.
ExecuteNonQueryTypedParams: Executes a stored procedure with typed parameters and returns the number of rows affected.
ExecuteNonQueryTypedParamsAsync: Asynchronous execution of a stored procedure with typed parameters.
DataSet to List Conversion: Convert a DataSet result to a strongly-typed list.
DataSet to Class Object Conversion: Map DataSet result to class objects effortlessly. Installation
To install the library via NuGet, run the following command in your NuGet Package Manager Console:
bash Copy code Install-Package SQLStoredProcedureCommandsFunctions Alternatively, add the package to your project via the .NET CLI:
bash Copy code dotnet add package SQLStoredProcedureCommandsFunctions Usage
Execute a Stored Procedure and Retrieve Data as a DataSet: csharp Copy code var dataset = DataAccessLayer.ExecuteDataset("storedProcedureName", params);
Execute a Stored Procedure with Typed Parameters (Non-Query): csharp Copy code int affectedRows = DataAccessLayer.ExecuteNonQueryTypedParams("storedProcedureName", typedParams);
Asynchronous Execution of a Stored Procedure: csharp Copy code var dataset = await DataAccessLayer.ExecuteDatasetAsync("storedProcedureName", params);
Convert DataSet to a List of Objects: csharp Copy code List<MyClass> myClassList = DataAccessConverter.ConvertToList<MyClass>(dataset);
Convert DataSet to Class Object: csharp Copy code MyClass myObject = DataAccessConverter.ConvertToList<MyClass>(datatable / dataset.Tables[0]); Contributing Contributions are welcome! If you encounter issues or have suggestions for improvements, feel free to open an issue or submit a pull request.
License This project is licensed under the MIT License - see the LICENSE file for details.
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. |
-
net8.0
- System.Data.SqlClient (>= 4.8.6)
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.0.3
Initial Release:
This version introduces a comprehensive set of SQL stored procedure utility functions designed to streamline database operations. Key features include:
1. Stored Procedure Execution:
ExecuteDataset and ExecuteDatasetAsync: Execute SQL stored procedures and retrieve results as a DataSet.
ExecuteNonQueryTypedParams and ExecuteNonQueryTypedParamsAsync: Execute SQL stored procedures with typed parameters and return the number of affected rows.
Data Conversion Utilities:
2. DataSet to List: Convert a DataSet to a strongly-typed list, reducing manual data handling.
DataSet to Class Object: Seamlessly map DataSet results to class objects, improving data access layer efficiency.
Enhancements & Fixes:
Initial implementation of core functionalities.
Simplified data handling by reducing the need for manual object mapping from DataSet.
This release provides a solid foundation for SQL stored procedure execution and data conversion utilities, making database operations more efficient and developer-friendly.