Intent.FastEndpoints.Dispatch.Services
This module makes the endpoints generated by Intent.FastEndpoints dispatch each request to an application service, through the service's contract interface.
What this module generates
For each operation on a Service modelled in the Services designer, the endpoint:
- Takes the service's interface (for example
ICustomersService) in its constructor. - Calls the matching service operation from
HandleAsyncand sends its result.
Unit of work and message bus
When a unit of work is available (for example from Intent.EntityFrameworkCore), each endpoint that changes state runs inside a transaction and saves its changes before it responds. When a message bus is installed, those endpoints also flush the messages published while handling the request.
Endpoints for GET and QUERY operations are treated as read-only: they skip the unit of work and the message bus flush.