VOOZH about

URL: https://www.nuget.org/packages/Itmo.Dev.Platform.Postgres/

⇱ NuGet Gallery | Itmo.Dev.Platform.Postgres 1.2.388




👁 Image
Itmo.Dev.Platform.Postgres 1.2.388

Prefix Reserved
dotnet add package Itmo.Dev.Platform.Postgres --version 1.2.388
 
 
NuGet\Install-Package Itmo.Dev.Platform.Postgres -Version 1.2.388
 
 
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="Itmo.Dev.Platform.Postgres" Version="1.2.388" />
 
 
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Itmo.Dev.Platform.Postgres" Version="1.2.388" />
 
Directory.Packages.props
<PackageReference Include="Itmo.Dev.Platform.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 Itmo.Dev.Platform.Postgres --version 1.2.388
 
 
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Itmo.Dev.Platform.Postgres, 1.2.388"
 
 
#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 Itmo.Dev.Platform.Postgres@1.2.388
 
 
#: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=Itmo.Dev.Platform.Postgres&version=1.2.388
 
Install as a Cake Addin
#tool nuget:?package=Itmo.Dev.Platform.Postgres&version=1.2.388
 
Install as a Cake Tool
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Itmo.Dev.Platform.Postgres

Platform extensions for working with PostgreSQL database

Connection

You can obtain database connection using IPostgresConnectionProvider

var connection = await provider.GetConnectionAsync(cancellationToken);

Migrations

Package using FluentMigrator as it's migration engine, thus all FluentMigrator's migrations are compatible and will be executed.

Nevertheless, it is strongly recommended to inherit from SqlMigration and implement your migrations as raw sql queries.

[Migration(1, "Initial")]
public class InitialMigration : SqlMigration
{
 protected override string GetUpSql(IServiceProvider serviceProvider)
 {
 return """
 CREATE TABLE USERS
 (
 user_id bigint PRIMARY KEY,
 user_name text NOT NULL
 );
 """;
 }
 
 protected override string GetDownSql(IServiceProvider serviceProvider)
 {
 return """
 DROP TABLE USERS;
 """;
 }
}

Registration

Use extension methods on service collection to register Itmo.Dev.Platform.Postgres services and migrations.

Connection

To configure connection string bind configuration with such schema to configuration builder, using extension method's parameter.

{
 "Host" : "string",
 "Port" : 5432,
 "Database" : "string",
 "Username" : "string",
 "Password" : "string",
 "SslMode" : "string",
 "Pooling" : true
}
collection.AddPlatformPostgres(options => options.Bind("Database"));

Migrations

To register migrations call AddPlatformMigrations on service collection. Pass the assemblies containing migration classes.

collection.AddPlatformMigrations(typeof(IMigrationsAssemblyMarker).Assembly);

To run migrations, create scope and call UsePlatformMigrationsAsync on it.

using var scope = serviceProvider.CreateScope();
await scope.UsePlatformMigrationsAsync()
Product Versions Compatible and additional computed target framework versions.
.NET net10.0 net10.0 is compatible.  net10.0-android net10.0-android was computed.  net10.0-browser net10.0-browser was computed.  net10.0-ios net10.0-ios was computed.  net10.0-maccatalyst net10.0-maccatalyst was computed.  net10.0-macos net10.0-macos was computed.  net10.0-tvos net10.0-tvos was computed.  net10.0-windows 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.2.388 115 4/27/2026
1.2.384 113 4/11/2026
1.2.364 132 3/11/2026
1.2.356 128 3/2/2026
1.2.352 123 2/28/2026
1.2.350 125 2/28/2026
1.2.348 142 2/28/2026
1.2.334 138 2/14/2026
1.2.332 120 2/14/2026
1.2.330 125 2/14/2026
1.2.328 126 2/14/2026
1.2.324 212 12/13/2025
1.2.318 205 11/16/2025
1.2.308 248 10/9/2025
1.2.298 238 10/5/2025
1.2.296 228 10/5/2025
1.2.288 268 5/17/2025
1.2.275 188 5/10/2025
1.2.271 208 5/10/2025
1.2.269 189 5/10/2025
Loading failed

Updated .Common package