Anarchy.Toolkit.Infrastructure.Persistence.Postgres 1.1.3

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

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 ModulePostgres with factories for PostgresConnectionOptions and PostgresResilienceOptions.
  • Register reader and writer health checks with AddPostgresHealthReports() or ModulePostgresHealthReport.
  • 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.3

  • chore(docs): Update release notes

1.1.2

  • build: migrate local automation to NUKE

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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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.