Anarchy.Toolkit.Infrastructure.Persistence.Postgres
1.1.5
See the version list below for details.
dotnet add package Anarchy.Toolkit.Infrastructure.Persistence.Postgres --version 1.1.5
NuGet\Install-Package Anarchy.Toolkit.Infrastructure.Persistence.Postgres -Version 1.1.5
<PackageReference Include="Anarchy.Toolkit.Infrastructure.Persistence.Postgres" Version="1.1.5" />
<PackageVersion Include="Anarchy.Toolkit.Infrastructure.Persistence.Postgres" Version="1.1.5" />
<PackageReference Include="Anarchy.Toolkit.Infrastructure.Persistence.Postgres" />
paket add Anarchy.Toolkit.Infrastructure.Persistence.Postgres --version 1.1.5
#r "nuget: Anarchy.Toolkit.Infrastructure.Persistence.Postgres, 1.1.5"
#:package Anarchy.Toolkit.Infrastructure.Persistence.Postgres@1.1.5
#addin nuget:?package=Anarchy.Toolkit.Infrastructure.Persistence.Postgres&version=1.1.5
#tool nuget:?package=Anarchy.Toolkit.Infrastructure.Persistence.Postgres&version=1.1.5
Anarchy.Toolkit.Infrastructure.Persistence.Postgres
PostgreSQL adapter for the toolkit's relational persistence layer, using Npgsql.
dotnet add package Anarchy.Toolkit.Infrastructure.Persistence.Postgres
PostgresDbDialect, connection pools, unit of work, retry and resilience policies, and repository bases adapt the shared relational layer to PostgreSQL.- Register
ModulePostgreswith factories forPostgresConnectionOptionsandPostgresResilienceOptions. - Register reader and writer health checks with
AddPostgresHealthReports()orModulePostgresHealthReport. - Use Testing.Postgres for database test helpers.
When to use it
Use this provider when a toolkit application stores relational data in PostgreSQL and needs Npgsql-backed pools, repositories, unit-of-work coordination and optional health checks. Your application still owns its schema, migrations and SQL.
How to use it
Register an Observer first, then configure the module with factories that read the application's configuration. For example, with configuration, environment and section binding already set up:
using Anarchy.Toolkit.Core.Composition.Extension.Microsoft.DependencyInjection;
using Anarchy.Toolkit.Infrastructure.Persistence.Postgres.DependencyInjection.Module;
using Anarchy.Toolkit.Infrastructure.Persistence.Postgres.Entity.Configuration.Storage.Database;
using Microsoft.Extensions.Configuration;
services.UseModule(
new ModulePostgres(
config => config.GetSection("Postgres").Get<PostgresConnectionOptions>()!,
config => new PostgresResilienceOptions(config.GetValue<int>("Resilience:RetryCount"))),
configuration, environment);
Populate and validate reader/writer hosts, credentials, database name, time zone and command timeout in that section; a null port uses 5432. Set MaximumPoolSize when the default of 100 is unsuitable. The unkeyed storage policy uses the writer; keyed reader and writer policies select the corresponding pools. Register health reports separately and use provider repository bases with your own PostgreSQL SQL.
See the module registration example and toolkit overview.
Releases
1.1.5
- docs: expand XML docblocks across all projects for the DocFX API reference
1.1.4
- refactor(src): clean up code style across library packages
1.1.2
- build: migrate local automation to build tooling
1.1.1
- docs: expand package guides and release histories
- chore(deps): update AWS, Polly, and xUnit packages
1.1.0
- Applied the configurable maximum pool size to PostgreSQL connection strings.
1.0.1
- Added a package-specific NuGet README.
1.0.0
- Introduced the PostgreSQL relational persistence provider, connection handling and provider-specific health reporting.
| 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
- Anarchy.Toolkit.Core (>= 1.0.6)
- Anarchy.Toolkit.Infrastructure.Persistence.Db (>= 1.1.5)
- Dapper (= 2.1.79)
- Humanizer (>= 3.0.10)
- Microsoft.Extensions.Configuration.Abstractions (>= 10.0.15)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.15)
- Microsoft.Extensions.Hosting.Abstractions (>= 10.0.15)
- Newtonsoft.Json (>= 13.0.4)
- Npgsql (>= 10.0.3)
- Polly.Core (>= 8.9.1)
- Serilog (>= 4.4.0)
- Serilog.Sinks.Console (>= 6.1.1)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Anarchy.Toolkit.Infrastructure.Persistence.Postgres:
| Package | Downloads |
|---|---|
|
Anarchy.Toolkit.Testing.Postgres
PostgreSQL integration-test fixtures: connection string, connection pool, retry/resilience policy and Unit of Work fixtures, options mapping, enum type handlers, and table reset helpers. |
GitHub repositories
This package is not used by any popular GitHub repositories.
Initial release.