Skip to content

Walkthrough: one booking app from request to response, as a sample that CI builds and runs #418

Closed

Description

@CaffeinatedCoder

Problem

Each guide covers one boundary: binding and JSON in docs/serialization.md, mapping and queries in docs/efcore.md, the exclusion constraint in docs/efcore.md#reject-overlapping-rows-with-an-exclusion-constraint. None shows them working together in one application, and none says where a value changes on the way through: canonical form on construction, microsecond truncation when it's stored, infinity at the extremes, the literal on the wire.

A walkthrough written as prose alone would go stale, because nothing compiles its snippets.

Change

  • A sample application that runs. A minimal API booking service, using:

    • a requested stay bound from the query string and from a JSON body;
    • validation;
    • storage with an exclusion constraint against overlapping bookings per room;
    • room features as a StringSet, filtered with @>;
    • availability as the bookings' RangeSet, its gaps found with Except;
    • a JSON response.

    It adds the constraint with explicit SQL in a migration, so it works on both lines (ComplexIndexes can't be installed beside the EF Core 11 packages until SchemaKit ships, SchemaKit 11.0.0-preview.1: the first slice of the new API, on EF Core 11 / Npgsql 11 under the new ids EFCore.ComplexIndexes#38).

  • CI runs it and checks what it says. It runs against a live PostgreSQL and asserts on the HTTP responses and the translated SQL, never on the exit code alone. The natural home is a fifth consumer in test/consumer-smoke-test.sh. That way it compiles outside the repository against the packed packages, as a reader's project would, and Directory.Build.props doesn't apply.

  • docs/walkthrough.md, in the plain-docs voice, quotes excerpts from the sample and links to the full source. Each step says what changes at that boundary, or that nothing does. A convention test checks that every quoted excerpt still matches the sample's source, so they can't drift apart.

  • Claims. The walkthrough's promises go into claims.json. If heldBy can't name the smoke consumer, an integration test holds them.

  • Both lines. It lands on main first and is cherry-picked with -x into release/10.x, with 10.x package versions.

Done when

  • The sample builds and runs in CI on every PR on both lines, and fails when an answer it prints changes.
  • docs/walkthrough.md is linked from the README and docs/getting-started.md, and from the docs site's navigation once that exists.
  • The excerpt check fails when a quoted excerpt is edited without changing the sample's source: seed it and check that it fails.

Activity

  1. added
    documentationImprovements or additions to documentation
    area/rangesRange unions, variants and the shape engines
    area/range-setRangeSet and multirange algebra
    area/value-setsValue set families and wrapper arities
    package/efcoreAffects CodoMetis.ValueRanges.EFCore.PostgreSQL
    area/jsonSystem.Text.Json and TypeConverter wire forms
    package/coreAffects CodoMetis.ValueRanges
    on Oct 25, 2026
  2. added this to the 10.3.0 milestone on Oct 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/jsonSystem.Text.Json and TypeConverter wire formsarea/range-setRangeSet and multirange algebraarea/rangesRange unions, variants and the shape enginesarea/value-setsValue set families and wrapper aritiesdocumentationImprovements or additions to documentationpackage/coreAffects CodoMetis.ValueRangespackage/efcoreAffects CodoMetis.ValueRanges.EFCore.PostgreSQL

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions