Raycynix.Extensions.Database.PostgreSql
3.0.0
dotnet add package Raycynix.Extensions.Database.PostgreSql --version 3.0.0
NuGet\Install-Package Raycynix.Extensions.Database.PostgreSql -Version 3.0.0
<PackageReference Include="Raycynix.Extensions.Database.PostgreSql" Version="3.0.0" />
<PackageVersion Include="Raycynix.Extensions.Database.PostgreSql" Version="3.0.0" />
<PackageReference Include="Raycynix.Extensions.Database.PostgreSql" />
paket add Raycynix.Extensions.Database.PostgreSql --version 3.0.0
#r "nuget: Raycynix.Extensions.Database.PostgreSql, 3.0.0"
#:package Raycynix.Extensions.Database.PostgreSql@3.0.0
#addin nuget:?package=Raycynix.Extensions.Database.PostgreSql&version=3.0.0
#tool nuget:?package=Raycynix.Extensions.Database.PostgreSql&version=3.0.0
Raycynix.Extensions.Database.PostgreSql
PostgreSQL provider integration for Raycynix.Extensions.Database.
What It Provides
AddPostgreSql(...)PostgreSqlOptions- PostgreSQL structured connection-string composition
- PostgreSQL provider-specific validation
- EF Core
UseNpgsql(...)configuration with retries, command timeout, pooling, and migrations assembly support
The provider is selected by calling .AddPostgreSql(...).
Usage
builder.Services
.AddRaycynixDatabase(builder.Configuration, options =>
{
options.UseMigrations = true;
options.EnsureCreated = false;
})
.AddPostgreSql(postgreSql =>
{
postgreSql.IncludeErrorDetail = false;
postgreSql.CommandTimeoutSeconds = 30;
});
Configuration
{
"DatabaseOptions": {
"ConnectionOptions": {
"Host": "localhost",
"Port": 5432,
"Name": "app",
"Username": "app",
"Password": "secret"
},
"UseMigrations": true,
"EnsureCreated": false,
"PostgreSqlOptions": {
"Pooling": true,
"MinimumPoolSize": 5,
"MaximumPoolSize": 50,
"CommandTimeoutSeconds": 30,
"IncludeErrorDetail": false
}
}
}
When a raw ConnectionString is not supplied, structured PostgreSQL configuration requires Host, Name, and Username.
Logging
The provider emits optional Microsoft.Extensions.Logging diagnostics for validation, connection-string source selection, and EF Core provider configuration. Connection strings, usernames, and passwords are never logged.
Migrating From 2.x
- Replace
PostgreSqlConfigurationwithPostgreSqlOptions. - Import it from
Raycynix.Extensions.Database.PostgreSql.Options. - Rename the section from
DatabaseConfiguration:PostgreSqlConfigurationtoDatabaseOptions:PostgreSqlOptions. - Invalid pool ranges and negative command timeouts now fail during options validation.
| 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
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.10)
- Npgsql.EntityFrameworkCore.PostgreSQL (>= 10.0.3)
- Raycynix.Extensions.Configuration (>= 3.0.0)
- Raycynix.Extensions.Database.Abstractions (>= 3.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
v3.0.0 replaces PostgreSqlConfiguration with PostgreSqlOptions, binds from DatabaseOptions:PostgreSqlOptions, and validates pool ranges and command timeout during options resolution.