MeshWeaver.Hosting.PostgreSql
3.0.0-preview1
dotnet add package MeshWeaver.Hosting.PostgreSql --version 3.0.0-preview1
NuGet\Install-Package MeshWeaver.Hosting.PostgreSql -Version 3.0.0-preview1
<PackageReference Include="MeshWeaver.Hosting.PostgreSql" Version="3.0.0-preview1" />
<PackageVersion Include="MeshWeaver.Hosting.PostgreSql" Version="3.0.0-preview1" />
<PackageReference Include="MeshWeaver.Hosting.PostgreSql" />
paket add MeshWeaver.Hosting.PostgreSql --version 3.0.0-preview1
#r "nuget: MeshWeaver.Hosting.PostgreSql, 3.0.0-preview1"
#:package MeshWeaver.Hosting.PostgreSql@3.0.0-preview1
#addin nuget:?package=MeshWeaver.Hosting.PostgreSql&version=3.0.0-preview1&prerelease
#tool nuget:?package=MeshWeaver.Hosting.PostgreSql&version=3.0.0-preview1&prerelease
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
Related Projects
- 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 | 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
- Azure.AI.Inference (>= 1.0.0-beta.5)
- MeshWeaver.Hosting (>= 3.0.0-preview1)
- Npgsql (>= 10.0.2)
- Pgvector (>= 0.3.2)
- System.Security.Cryptography.Xml (>= 10.0.6)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.