ArturRios.Data.PostgreSql
3.0.0
dotnet add package ArturRios.Data.PostgreSql --version 3.0.0
NuGet\Install-Package ArturRios.Data.PostgreSql -Version 3.0.0
<PackageReference Include="ArturRios.Data.PostgreSql" Version="3.0.0" />
<PackageVersion Include="ArturRios.Data.PostgreSql" Version="3.0.0" />
<PackageReference Include="ArturRios.Data.PostgreSql" />
paket add ArturRios.Data.PostgreSql --version 3.0.0
#r "nuget: ArturRios.Data.PostgreSql, 3.0.0"
#:package ArturRios.Data.PostgreSql@3.0.0
#addin nuget:?package=ArturRios.Data.PostgreSql&version=3.0.0
#tool nuget:?package=ArturRios.Data.PostgreSql&version=3.0.0
ArturRios.Data.PostgreSql
The PostgreSQL provider for the ArturRios.Data toolkit, backed by
Npgsql. It plugs PostgreSQL into
ArturRios.Data.Relational.Core
via a single IDatabaseProvider registration — your entities, repositories, and unit of work stay
exactly the same as with any other engine.
This package is a thin provider. All the repository and transaction surface lives in
ArturRios.Data.Relational.Core, which you install alongside it.
Installation
dotnet add package ArturRios.Data.Relational.Core
dotnet add package ArturRios.Data.PostgreSql
Requires .NET 10.0 or later.
Quick start
1. Configure (appsettings.json, default section "ArturRios.Data.Core"):
{
"ArturRios.Data.Core": {
"DatabaseType": "PostgreSql",
"ConnectionString": "Host=localhost;Database=mydb;Username=app;Password=secret;"
}
}
2. Register the provider before the data layer (Program.cs):
using ArturRios.Data.PostgreSql; // brings AddPostgreSqlProvider()
using ArturRios.Data.Relational.Core.DependencyInjection;
builder.Services.AddPostgreSqlProvider();
builder.Services.AddDataConfigFromSettings<AppDbContext>(builder.Configuration, "ArturRios.Data.Core");
That's the whole provider-specific surface. From here on you use IAsyncRepository<T>,
IAsyncUnitOfWork, and the rest of the core API — see the
Relational guide.
What it does
AddPostgreSqlProvider() registers PostgreSqlProvider as a singleton IDatabaseProvider with
Type => DatabaseType.PostgreSql. When AddDataConfigFromSettings<TContext> builds your context and the configured
DatabaseType is PostgreSql, this provider is selected and calls UseNpgsql(connectionString).
If the configured DatabaseType has no matching provider registered, registration fails fast with a
DataAccessException naming the missing provider.
Documentation
- 📚 Full documentation: https://artur-rios.github.io/dotnet-data
- 🗄️ Relational guide: https://artur-rios.github.io/dotnet-data/relational/
- 🧩 Architecture & diagrams: https://artur-rios.github.io/dotnet-data/architecture/
Legal
Licensed under the MIT License.
| 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
- ArturRios.Data.Relational.Core (>= 3.0.0)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.10)
- Npgsql.EntityFrameworkCore.PostgreSQL (>= 10.0.3)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.