Follow this guide to implement a Get By ID endpoint in the ApiService.
- •
Prerequisites
- •Ensure the Projection exists (
/scaffold-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
- •
/scaffold-list-query: For fetching lists of resources.