Refactor backend to remove service command models
This commit is contained in:
4
FAQ.md
4
FAQ.md
@@ -32,6 +32,6 @@ No. The backend loads state from SQLite once during startup into in-memory state
|
||||
|
||||
Coverage now includes the entire backend project (`RpgRoller`), including API/hosting/bootstrap code and services. It is no longer restricted to `RpgRoller.Services.*`.
|
||||
|
||||
## Why do backend services use `*Command` types instead of API request DTOs?
|
||||
## Why do backend services avoid API request DTO dependencies?
|
||||
|
||||
Service workflows now consume service-layer command models (for example, `CreateCampaignCommand`) so endpoint transport contracts stay isolated in the API layer. This reduces coupling and keeps service code reusable when input shapes evolve at the HTTP boundary.
|
||||
Service workflows accept explicit parameters (for example, `CreateCampaign(sessionToken, name, rulesetId)`) instead of API request DTOs. This keeps the service layer independent from HTTP transport contracts while avoiding extra service-only wrapper command types.
|
||||
|
||||
Reference in New Issue
Block a user