❔ Question about Layered Structure
Guys do you think it is bad to expose Entities Layer both DAL and Services layer? And where should I store my DTOs? My layers are API, DAL, Entities, Services.
4 Replies
wait, are DTOs now in API?
I haven't wrote the DTOs yet, but I was thinking to place them under Services layer since I think it is bussines logic to map objects
no, it's simple
if those are models used by API to the extern world, then put them in API or in an abstraction layer inherited by API
if those are models used by Services, then put them in abstraction layer that Services inherits
think of it as every layer has its models
there can be exceptions, obviously, but they are still exceptions
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.