Acontplus.Persistence.SqlServer
1.3.0
dotnet add package Acontplus.Persistence.SqlServer --version 1.3.0
NuGet\Install-Package Acontplus.Persistence.SqlServer -Version 1.3.0
<PackageReference Include="Acontplus.Persistence.SqlServer" Version="1.3.0" />
<PackageVersion Include="Acontplus.Persistence.SqlServer" Version="1.3.0" />
<PackageReference Include="Acontplus.Persistence.SqlServer" />
paket add Acontplus.Persistence.SqlServer --version 1.3.0
#r "nuget: Acontplus.Persistence.SqlServer, 1.3.0"
#:package Acontplus.Persistence.SqlServer@1.3.0
#addin nuget:?package=Acontplus.Persistence.SqlServer&version=1.3.0
#tool nuget:?package=Acontplus.Persistence.SqlServer&version=1.3.0
Acontplus.Persistence.SqlServer
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 contextDbContextFactory
- Context factoryBaseRepository
/AdoRepository
- Repository implementationsRepositoryException
,SqlDomainException
,UnitOfWorkException
- Error handlingDbDataReaderMapper
- Data reader mappingDataTableNameMapper
- 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 | Versions 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. |
-
net9.0
- Acontplus.Core (>= 1.3.1)
- Acontplus.Persistence.Shared (>= 1.0.0)
- Microsoft.Data.SqlClient (>= 6.0.2)
- Microsoft.EntityFrameworkCore (>= 9.0.7)
- Microsoft.EntityFrameworkCore.SqlServer (>= 9.0.7)
- Microsoft.Extensions.Configuration.Abstractions (>= 9.0.7)
- Microsoft.Extensions.DependencyInjection (>= 9.0.7)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 9.0.7)
- Microsoft.Extensions.Logging.Abstractions (>= 9.0.7)
- Microsoft.IdentityModel.Tokens (>= 8.12.1)
- Polly (>= 8.6.2)
- System.IdentityModel.Tokens.Jwt (>= 8.12.1)
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.4 | 463 | 7/1/2025 |
Updated for .NET 9+ with async/await, repository pattern, and enhanced documentation.