CodeLogic.PostgreSQL
3.3.0
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package CodeLogic.PostgreSQL --version 3.3.0
NuGet\Install-Package CodeLogic.PostgreSQL -Version 3.3.0
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="CodeLogic.PostgreSQL" Version="3.3.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="CodeLogic.PostgreSQL" Version="3.3.0" />
<PackageReference Include="CodeLogic.PostgreSQL" />
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 CodeLogic.PostgreSQL --version 3.3.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: CodeLogic.PostgreSQL, 3.3.0"
#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 CodeLogic.PostgreSQL@3.3.0
#: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=CodeLogic.PostgreSQL&version=3.3.0
#tool nuget:?package=CodeLogic.PostgreSQL&version=3.3.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
CL.PostgreSQL
PostgreSQL database access for CodeLogic 3 applications with multi-database support, a LINQ query builder, table sync, and migrations.
Install
dotnet add package CodeLogic.PostgreSQL
Quick Start
var pgLib = new PostgreSQLLibrary();
// After library initialization via CodeLogic framework:
// Typed repository
var repo = pgLib.GetRepository<User>();
// Fluent query builder
var users = await pgLib.Query<User>()
.Where(u => u.IsActive)
.OrderBy(u => u.Name)
.ToListAsync();
// Transactions
await using var tx = await pgLib.BeginTransactionAsync();
// Table sync (schema migrations)
var result = await pgLib.SyncTableAsync<User>();
Features
- Multi-database support -- manage connections to multiple PostgreSQL instances from one config
- LINQ query builder -- fluent
Query<T>()API withWhere,OrderBy, and typed results - Repository pattern --
GetRepository<T>()for standard CRUD operations - Table sync and migrations -- automatic schema synchronization with backup support
- Connection pooling -- configurable pool sizes, idle timeouts, and slow-query thresholds
Configuration
Config file: config.postgresql.json
{
"Databases": {
"Default": {
"Enabled": true,
"Host": "localhost",
"Port": 5432,
"Database": "mydb",
"Username": "postgres",
"Password": "",
"ConnectionTimeout": 30,
"CommandTimeout": 30,
"MinPoolSize": 5,
"MaxPoolSize": 100,
"SslMode": "Prefer",
"SlowQueryThresholdMs": 1000
}
}
}
Documentation
Full API docs: https://github.com/Media2A/CodeLogic.Libs
Requirements
- .NET 10.0+
- CodeLogic 3.0.0+
- Npgsql 9.x
License
MIT -- see LICENSE for details.
| 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. |
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 |
|---|---|---|
| 4.5.2 | 89 | 5/24/2026 |
| 4.5.1 | 91 | 5/24/2026 |
| 4.5.1-preview.56 | 45 | 5/24/2026 |
| 4.4.2-preview.53 | 51 | 5/24/2026 |
| 4.4.1 | 90 | 5/24/2026 |
| 4.0.5 | 91 | 5/15/2026 |
| 4.0.4 | 98 | 5/9/2026 |
| 4.0.3 | 97 | 5/9/2026 |
| 3.3.1 | 97 | 4/18/2026 |
| 3.3.0 | 103 | 4/18/2026 |
| 3.2.11 | 93 | 4/18/2026 |
| 3.2.10 | 93 | 4/18/2026 |
| 3.2.9 | 93 | 4/18/2026 |
| 3.2.8 | 95 | 4/18/2026 |
| 3.2.7 | 90 | 4/18/2026 |
| 3.2.6 | 88 | 4/18/2026 |
| 3.2.5 | 97 | 4/18/2026 |
| 3.2.4 | 96 | 4/17/2026 |
| 3.2.3 | 100 | 4/17/2026 |
| 3.2.2 | 93 | 4/17/2026 |
Loading failed