Follow this guide to implement a Get By ID endpoint in the ApiService.
Prerequisites
- Ensure the Projection exists (
/marten__single_stream_projectionor similar).
- Ensure the Projection exists (
Create Endpoint
- Create/Update
src/BookStore.ApiService/Endpoints/{Resource}Endpoints.cs - Method:
MapGet - Logic:
GetOrCreateLocalizedAsync->LoadAsync-> Map to DTO - Template:
templates/GetByIdEndpoint.cs
- Create/Update
Client Integration
- Create
IGet{Resource}Endpoint.csin Client project.
- Create
Related Skills
/marten__list_query: For fetching lists of resources.