MeshWeaver.Hosting.PostgreSql 2.1.0

dotnet add package MeshWeaver.Hosting.PostgreSql --version 2.1.0
                    
NuGet\Install-Package MeshWeaver.Hosting.PostgreSql -Version 2.1.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="MeshWeaver.Hosting.PostgreSql" Version="2.1.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="MeshWeaver.Hosting.PostgreSql" Version="2.1.0" />
                    
Directory.Packages.props
<PackageReference Include="MeshWeaver.Hosting.PostgreSql" />
                    
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 MeshWeaver.Hosting.PostgreSql --version 2.1.0
                    
#r "nuget: MeshWeaver.Hosting.PostgreSql, 2.1.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.
#addin nuget:?package=MeshWeaver.Hosting.PostgreSql&version=2.1.0
                    
Install MeshWeaver.Hosting.PostgreSql as a Cake Addin
#tool nuget:?package=MeshWeaver.Hosting.PostgreSql&version=2.1.0
                    
Install MeshWeaver.Hosting.PostgreSql as a Cake Tool

MeshWeaver.Hosting.PostgreSql

Overview

MeshWeaver.Hosting.PostgreSql provides PostgreSQL-based hosting capabilities for MeshWeaver applications. This library enables persistent storage and state management using PostgreSQL as the backend database, offering reliable data persistence for MeshWeaver instances.

Features

  • PostgreSQL-based persistence for MeshWeaver data
  • Efficient schema management
  • Support for both direct connection strings and named connections
  • Resilient connections with automatic retry on failure
  • Transaction management
  • High-performance data access patterns
  • Integration with MeshWeaver hosting infrastructure

Usage

We recommend using PostgreSQL together with Aspire. The corresponding extension method is meant to point to a connectionName, which will be configured in aspire.

Integration with Aspire

AppHost Configuration
// In Program.cs of your Aspire AppHost project
var builder = DistributedApplication.CreateBuilder(args);

// Set up PostgreSQL
var postgres = builder
    .AddPostgres("postgres")
    .WithPgAdmin()
    .WithDataVolume();

var meshweaverdb = postgres.AddDatabase("meshweaverdb");

// Reference the database in your services
var frontend = builder
    .AddProject<Projects.MeshWeaver_Portal_Web>("frontend")
    .WithReference(meshweaverdb);
Client Project Configuration
// In Program.cs of your service project
var builder = WebApplication.CreateBuilder(args);

// Add service defaults and connection
builder.AddServiceDefaults();

// Configure PostgreSQL
builder.ConfigurePostgreSqlContext("meshweaverdb");

var app = builder.Build();
app.Run();

Integration

  • Works with MeshWeaver.Hosting core infrastructure
  • Supports data persistence for MeshWeaver applications
  • Complements other hosting options for different deployment scenarios
  • Integrates with MeshWeaver's data ecosystem
  • Compatible with Microsoft Aspire for cloud-native applications
  • MeshWeaver.Hosting - Core hosting functionality
  • MeshWeaver.Hosting.Monolith - Single-process hosting
  • MeshWeaver.Hosting.Orleans - Distributed hosting
  • MeshWeaver.Data - Core data functionality

See Also

Refer to the main MeshWeaver documentation for more information about hosting options and configuration.

Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.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
2.1.0 149 4/6/2025
2.0.3 474 3/24/2025
2.0.2 444 3/24/2025
2.0.1 96 3/21/2025
2.0.0 131 3/20/2025