I am working on my project using ASP.NET Core Web API. I have opted for a clean architecture approach, comprising Core, Infrastructure, Application and Presentation layers.
The entities in my project are Employee (with a foreign key DepartmentId) and Department.
I've read that the repository in the Infrastructure layer should exclusively work with entities. However, I'm facing a challenge: how can I retrieve an Employee along with their DepartmentName?
I am considering using a DTO (Data Transfer Object), but the issue is that DTOs typically reside in the Application layer, not the Core layer.
Could you please provide some solutions on how to achieve this with a more robust architecture?
Thank you so much!