Pragmatic.Configuration.Database.Postgres 1.0.0-alpha.1

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

Pragmatic.Configuration

Zero-boilerplate configuration binding, validation, and DI registration via source generator, plus runtime stores with cascade resolution, multi-tenancy, hot-reload, and pluggable backends.

The Problem

Every IOptions<T> class needs the same binding/validation/registration boilerplate. Across 20 options classes that's hundreds of lines of ceremony, and validation is opt-in: forget one .ValidateDataAnnotations() and [Required] is silently ignored until it fails at runtime.

// 4 lines of ceremony per options class, repeated for every config type
services.AddOptions<BookingOptions>()
    .Bind(configuration.GetSection("Booking"))
    .ValidateDataAnnotations()
    .ValidateOnStart();

Beyond that: secrets vary by environment, dynamic reconfiguration needs a deploy, and per-tenant overrides become hardcoded switch statements.

The Solution: two pillars

Compile-time binding: annotate a class with [Configuration]; the generator produces the binding, DataAnnotation validation (on start, by default), and DI registration; the Pragmatic host calls that registration itself.

[Configuration]
public partial class BookingOptions
{
    [Required] public string CurrencyCode { get; init; } = "";
    [Range(1, 365)] public int MaxStayDays { get; init; }
}

Runtime stores (opt-in, AddPragmaticConfiguration()): a unified API over configuration with cascade resolution (user → tenant → environment → base, highest first; the tenant layer only with MultiTenant.Enabled), hot-reload, and pluggable backends (Database, Azure App Configuration, Redis, Consul, Kubernetes), without redeploying. Secrets live in an ISecretStore (Database, Azure Key Vault, AWS, GCP, Vault, Kubernetes), and a secret://{key} value is resolved from it at read time.

Installation

dotnet add package Pragmatic.Configuration
dotnet add package Pragmatic.SourceGenerator   # generates the [Configuration] binding

Status

Functional within 1.0.0-alpha: [Configuration] binding and validation, and the runtime stores (cascade, hot-reload, the backends above). See the roadmap.

Documentation

Guide What you'll learn
Concepts The two pillars, cascade resolution, hot-reload, choosing a backend
Getting Started Your first [Configuration] class and a runtime store
Stores Backends (Database, Azure), cascade, tenant overrides, hot-reload
Common Mistakes The most frequent configuration pitfalls
Troubleshooting Problem/solution guide with diagnostics

Requirements

  • .NET 10.0+
  • Pragmatic.SourceGenerator analyzer

License

Part of the Pragmatic.Design ecosystem. See Licensing. Pragmatic.Configuration is MIT-licensed.

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

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.0.0-alpha.6 59 11/21/2026
1.0.0-alpha.5 54 11/21/2026
1.0.0-alpha.4 74 11/16/2026
1.0.0-alpha.3 73 10/17/2026
1.0.0-alpha.2 73 10/12/2026
1.0.0-alpha.1 83 10/3/2026