© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•4y ago•
1 reply
bookuha

Where to map DTOs & Entities

1) Do I get DTO in controller, map it into an Entity and pass it to the handler (and map it to the dto once more to return it from action)
or
2) Do this in handlers/services?

Why?

As I'm aware, no layer should reference presentation layer, where DTOs are located.
But people keep telling me option 2 is more appropriate not specifying any reason
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

How to map Entity Framework entities containing circular references to DTOs?
C#CC# / help
3y ago
Entities and Models, DTOs oh my?
C#CC# / help
4y ago
DTOs inside of DTOs
C#CC# / help
4y ago
Where to handle mapping between DTOs and Entity objects?
C#CC# / help
13mo ago