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
<PackageReference Include="Lyo.Comic.Postgres" Version="2.0.1" />
<PackageVersion Include="Lyo.Comic.Postgres" Version="2.0.1" />
<PackageReference Include="Lyo.Comic.Postgres" />
paket add Lyo.Comic.Postgres --version 2.0.1
#r "nuget: Lyo.Comic.Postgres, 2.0.1"
#:package Lyo.Comic.Postgres@2.0.1
#addin nuget:?package=Lyo.Comic.Postgres&version=2.0.1
#tool nuget:?package=Lyo.Comic.Postgres&version=2.0.1
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. SharedAddPostgresMigrations<,>host helper used here.Lyo.Health. Health-probe abstraction implemented byPostgresComicStore.
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.EntityFrameworkCore10.0.5(direct, microsoft)Microsoft.EntityFrameworkCore.Design10.0.5(direct, microsoft)Microsoft.EntityFrameworkCore.Relational10.0.5(transitive, microsoft)Microsoft.Extensions.Hosting.Abstractions10.0.5(transitive, microsoft)Microsoft.Extensions.Options10.0.5(transitive, microsoft)Npgsql.EntityFrameworkCore.PostgreSQL10.0.3(transitive, third-party)
| 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
- Lyo.Comic (>= 2.0.0)
- Lyo.Exceptions (>= 2.0.0)
- Lyo.Health (>= 2.0.0)
- Lyo.Postgres (>= 2.0.0)
- Microsoft.EntityFrameworkCore (>= 10.0.5)
- Microsoft.Extensions.Configuration.Binder (>= 10.0.5)
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.