Lyo.Comic.Postgres 2.0.1

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

Lyo.Comic.Postgres

PostgreSQL and EF Core implementation of Lyo.Comic.IComicStore (PostgresComicStore) via ComicDbContext, PostgresComicOptions, and AddPostgresMigrations<ComicDbContext, PostgresComicOptions> so deployments can apply schema upgrades on startup.

PostgresComicStore also implements Lyo.Health.IHealth so orchestrators can probe relational connectivity.

Schema and migrations

Entities under Database/ cover the domain: SeriesEntity, AlternateTitleEntity, VolumeEntity, ChapterEntity, PageEntity, and CharacterEntity, each with an *EntityConfiguration (Fluent API mappings, indexes, and cascading deletes wired so removing a series prunes its volumes/chapters/pages/characters/alternate titles). Migrations live under Migrations/ (InitialCreate is the current baseline) and use the comic schema declared on PostgresComicOptions.Schema. Never hand-edit migrated columns in production. Ship code-first migrations alongside API changes.

Service registration (Extensions)

All six entry points are exposed as IServiceCollection extensions in Lyo.Comic.Postgres.Extensions:

Entry point Effect
AddComicDbContextFactory(Action<PostgresComicOptions>) Registers IOptions<PostgresComicOptions>, AddPostgresMigrations<ComicDbContext, PostgresComicOptions>(), and an IDbContextFactory<ComicDbContext> (UseNpgsql + migrations history under the configured schema). DbContext only. Does not register IComicStore.
AddComicDbContextFactoryFromConfiguration(IConfiguration, string sectionName = PostgresComicOptions.SectionName) Same as above. Binds from the configuration section (default "PostgresComic").
AddComicDbContextFactory(PostgresComicOptions options) Same as above with a pre-built options instance.
AddPostgresComicStore(Action<PostgresComicOptions>) Calls AddComicDbContextFactory(...) then registers IComicStore → singleton PostgresComicStore.
AddPostgresComicStoreFromConfiguration(IConfiguration, string sectionName = PostgresComicOptions.SectionName) Same as above. Binds from configuration.
AddPostgresComicStore(PostgresComicOptions options) Same as above with a pre-built options instance, for tests / integration harnesses.

PostgresComicOptions

Member Default Notes
ConnectionString empty Required (validated by all entry points).
EnableAutoMigrations false Consumed by AddPostgresMigrations<> to gate the hosted startup migration runner.
SectionName (const) "PostgresComic" Default appsettings section for the FromConfiguration overloads.
Schema (const) "comic" Used for the EF migrations history table and entity configurations.

Runtime expectations

PostgresComicStore opens a fresh ComicDbContext per call via the registered IDbContextFactory<ComicDbContext>, so a singleton is safe under concurrent requests. Each Save*Async runs SaveChangesAsync inside the using-scope of that single context. Callers that need cross-entity atomicity (for example saving a series together with its chapters) should orchestrate transactions above the store. When hosting under Lyo.Comic.Api (Lyo-Comic repo): mapper layers translate HTTP DTO ↔ domain records. Enrichment pipelines may batch external metadata. Those pipelines must respect transaction boundaries imposed by callers around Save*Async groupings.

See also

  • Lyo.Comic. Domain contract reference.
  • Lyo.Postgres. Shared AddPostgresMigrations<,> host helper used here.
  • Lyo.Health. Health-probe abstraction implemented by PostgresComicStore.

Dependencies

Generated from ProjectReference / PackageReference (same model as docs/Lyo.ProjectGraph.html).

  • Lyo.Comic (direct, lyo)
  • Lyo.Exceptions (direct, lyo)
  • Lyo.Health (direct, lyo)
  • Lyo.Postgres (direct, lyo)
  • Microsoft.EntityFrameworkCore 10.0.5 (direct, microsoft)
  • Microsoft.EntityFrameworkCore.Design 10.0.5 (direct, microsoft)
  • Microsoft.EntityFrameworkCore.Relational 10.0.5 (transitive, microsoft)
  • Microsoft.Extensions.Hosting.Abstractions 10.0.5 (transitive, microsoft)
  • Microsoft.Extensions.Options 10.0.5 (transitive, microsoft)
  • Npgsql.EntityFrameworkCore.PostgreSQL 10.0.3 (transitive, third-party)
Product 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 (1)

Showing the top 1 NuGet packages that depend on Lyo.Comic.Postgres:

Package Downloads
Lyo.Comic.Api

HTTP API surface for Lyo Comic: series, alternate titles, volumes, chapters, pages, and characters.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2.0.1 47 9/14/2026
2.0.0 83 9/9/2026
1.0.13 109 8/25/2026
1.0.11 96 8/23/2026
1.0.9 107 8/22/2026
1.0.6 93 8/20/2026
1.0.4 107 8/20/2026
1.0.3 102 8/19/2026
1.0.2 101 8/19/2026
1.0.1 105 8/18/2026
1.0.0 109 8/16/2026