# AppointmentDesk Booking API for a clinic: ASP.NET Core minimal API on .NET 10, EF Core 10 with SQLite, xUnit. ## Commands - Build and test from the repository root, where `AppointmentDesk.slnx` is: `dotnet build`, then `dotnet test`. Do not cd into a project folder first. - New migration: `dotnet ef migrations add --project src/AppointmentDesk.Api` ## Layout - `src/AppointmentDesk.Api/`: `Program.cs`, `Domain/` entities, `Data/` (DbContext, migrations, seed data), `Features//` endpoints and service. - `tests/AppointmentDesk.Tests/`: service unit tests on in-memory SQLite; endpoint tests through `AppointmentDeskFactory` (a WebApplicationFactory with a `FakeTimeProvider`). ## Conventions - Time comes from the injected `TimeProvider` (`GetUtcNow()`). Never write `DateTime.Now`, `DateTime.UtcNow`, `DateTime.Today` or `DateTimeOffset.Now` in `src/`. Tests set the time with `FakeTimeProvider`. - Test names are `Method_State_Expected`, for example `BookAsync_SlotAlreadyBooked_ReturnsConflict`. One assert concept per test. - Endpoints return errors as `TypedResults.Problem(...)` or `TypedResults.ValidationProblem(...)`, never as a bare string. ## Do not touch - Files under `src/AppointmentDesk.Api/Data/Migrations/` are generated. Never edit them by hand; add a migration with the command above. - Never run `dotnet ef database update` against Production. - Do not open or quote `src/AppointmentDesk.Api/appsettings.Production.json`. ## Working agreements - Do not edit `README.md`; it is regenerated at release. - Every change to an endpoint adds one line under `## Unreleased` in `CHANGELOG.md`. - Before you finish, run `dotnet build` and then `dotnet test` from the repository root as two separate commands. Never chain them in one command line. - Your final message is exactly three lines, starting `Changed:`, `Tested:` and `Review:`.