© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•3y ago•
176 replies
joren

How are DTO utilized

So I've been writing some end points for my learning project, and I stumbled on DTO. The concept I understand, limit view you return for privacy reasons, security reasons, having a smaller payload, etc.

How does it work in practice though, I saw that
auto mapper
auto mapper
is a thing used, which is awesome, that I can use and understand easily. However, what's best practice, when you have a DTO for a model, does the endpoint always return the DTO? Or do you have two endpoints, one that return the actual model, and one the DTO?
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
Next page

Similar Threads

How to structure this DTO?
C#CC# / help
4y ago
❔ FluentValidation DTO
C#CC# / help
3y ago
DTO is fine? DTO have any alternatives?
C#CC# / help
2y ago
Model to DTO
C#CC# / help
3y ago