<One sentence: what this service does.>
Stack
-
.NET <9 or 10>, ASP.NET Core (<minimal APIs controllers>), EF Core, <SQL Server PostgreSQL> - Tests: xUnit,
, `WebApplicationFactory` for integration tests
Commands
- Build:
dotnet build - Run:
dotnet run --project src/<Api> - Tests:
dotnet test(filter:dotnet test --filter "FullyQualifiedName~OrderTests") - Format:
dotnet format - Migrations:
dotnet ef migrations add <Name> --project src/<Infrastructure> --startup-project src/<Api>; apply:dotnet ef database update ...
Rules
- Nullable reference types are on; fix warnings instead of suppressing with
!unless provably non-null. - Async all the way: no
.Resultor.Wait(); passCancellationTokenthrough. -
Use DTOs/records for requests and responses; validate input (<FluentValidation data annotations>). - Register services with the right lifetime; never inject a scoped service (like
DbContext) into a singleton. - EF Core: use
AsNoTracking()for read-only queries; avoid N+1 withIncludeor projections; review generated migrations. - Secrets via user secrets in development and environment/key vault in production; never in
appsettings.json.
Definition of done
dotnet buildwith no new warnings,dotnet testanddotnet format --verify-no-changespass.