Repository navigation
Walkthrough: one booking app from request to response, as a sample that CI builds and runs #418
Description
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 withExcept; - 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, andDirectory.Build.propsdoesn'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. IfheldBycan't name the smoke consumer, an integration test holds them. -
Both lines. It lands on
mainfirst and is cherry-picked with-xintorelease/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.mdis linked from the README anddocs/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
fix: the walkthrough sample names the newest release on nuget.org (#418)
fix: leave a page that isn't on release/10.x out of that line's menu (#…
docs: changelog line, release steps and wrap for the walkthrough (#418)
docs: walk one booking through a sample that CI runs (#418) (#421)