Acontplus.Persistence.SqlServer 1.2.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package Acontplus.Persistence.SqlServer --version 1.2.0
                    
NuGet\Install-Package Acontplus.Persistence.SqlServer -Version 1.2.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="Acontplus.Persistence.SqlServer" Version="1.2.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Acontplus.Persistence.SqlServer" Version="1.2.0" />
                    
Directory.Packages.props
<PackageReference Include="Acontplus.Persistence.SqlServer" />
                    
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 Acontplus.Persistence.SqlServer --version 1.2.0
                    
#r "nuget: Acontplus.Persistence.SqlServer, 1.2.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 Acontplus.Persistence.SqlServer@1.2.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=Acontplus.Persistence.SqlServer&version=1.2.0
                    
Install as a Cake Addin
#tool nuget:?package=Acontplus.Persistence.SqlServer&version=1.2.0
                    
Install as a Cake Tool

Acontplus.Persistence.SqlServer

NuGet .NET License

A modern .NET 9+ library for SQL Server persistence, ADO.NET, and Entity Framework Core integration. Includes repositories, context management, and advanced error handling for robust data access.

🚀 Features

  • Database context management - Base context and factory for EF Core
  • Repository pattern - Generic and ADO.NET repositories
  • SQL Server integration - Optimized for SQL Server
  • Data reader mapping utilities - Fast mapping from DbDataReader
  • Parameter handling helpers - Safe and flexible parameterization
  • Advanced error handling - Custom exceptions and translators

📦 Installation

NuGet Package Manager

Install-Package Acontplus.Persistence.SqlServer

.NET CLI

dotnet add package Acontplus.Persistence.SqlServer

PackageReference

<ItemGroup>
  <PackageReference Include="Acontplus.Persistence.SqlServer" Version="1.0.14" />
</ItemGroup>

🎯 Quick Start

1. Register DbContext and Repository

services.AddDbContext<BaseContext>(options =>
    options.UseSqlServer(Configuration.GetConnectionString("DefaultConnection")));
services.AddScoped(typeof(IRepository<,>), typeof(BaseRepository<,>));

2. Use ADO.NET Repository

var repo = serviceProvider.GetRequiredService<IAdoRepository>();
var result = await repo.ExecuteQueryAsync("SELECT * FROM MyTable");

🔧 Advanced Usage

Custom Exception Handling

try {
    // ... data access code ...
} catch (RepositoryException ex) {
    // handle repository errors
}

DataTable Mapping

var entities = DbDataReaderMapper.MapToList<MyEntity>(reader);

📚 API Documentation

  • BaseContext - EF Core base context
  • DbContextFactory - Context factory
  • BaseRepository / AdoRepository - Repository implementations
  • RepositoryException, SqlDomainException, UnitOfWorkException - Error handling
  • DbDataReaderMapper - Data reader mapping
  • DataTableNameMapper - Table name helpers

🤝 Contributing

We welcome contributions! Please see our Contributing Guidelines for details.

Development Setup

git clone https://github.com/Acontplus-S-A-S/acontplus-dotnet-libs.git
cd acontplus-dotnet-libs
dotnet restore
dotnet build

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

🆘 Support

  • 📧 Email: proyectos@acontplus.com
  • 🐛 Issues: GitHub Issues
  • 📖 Documentation: Wiki

👨‍💻 Author

Ivan Paz - @iferpaz7

🏢 Company

Acontplus S.A.S. - Enterprise software solutions


Built with ❤️ for the .NET community

Product Compatible and additional computed target framework versions.
.NET 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 was computed.  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
1.3.0 56 7/18/2025
1.2.0 139 7/14/2025
1.1.0 131 7/14/2025
1.0.18 74 7/11/2025
1.0.17 72 7/11/2025
1.0.16 135 7/10/2025
1.0.15 131 7/10/2025
1.0.14 121 7/10/2025
1.0.13 132 7/9/2025
1.0.12 144 7/9/2025
1.0.11 304 7/6/2025
1.0.10 300 7/6/2025
1.0.9 327 7/4/2025
1.0.8 134 7/2/2025
1.0.7 134 7/2/2025
1.0.6 122 7/2/2025
1.0.5 284 7/2/2025 1.0.5 is deprecated because it is no longer maintained.
1.0.4 463 7/1/2025 1.0.4 is deprecated because it is no longer maintained.

Updated for .NET 9+ with async/await, repository pattern, and enhanced documentation.