Subbz
Subbz
CC#
Created by Subbz on 2/14/2023 in #help
Best practice for return data from API
I'm building a small employee scheduling app to learn .NET. I have an API endpoint that returns all shifts for a given date range, grouped by an employee ID, shifts are nested to each employee id and ordered by date.. I'm not sure if my approach is good. When I'm going to consume this in my front end, I want to show the employees name, not their ID. Would it be better to include this in the response from the shifts endpoint, or for the frontend to pull the name from Employees endpoint when parsing the shifts?
16 replies