© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•4y ago•
16 replies
bookuha

REST? DTOs

I have two entities: Book, Author
And two DTOs for both of them.

I want to receive a BookDTO in my controller action.
Do I want to have AuthorDTO in it,
like, is it normal to create another entities through a Book one?
Or do I separate it with distinct controllers: one for Books, one for Authors.
I get a Book and AuthorID (not an entire object),
or I can access Book Authors via AuthorsConroller
(books/id/authors)
What is a better way? Thank you
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

DTOs inside of DTOs
C#CC# / help
4y ago
❔ DTOs Pros and Cons
C#CC# / help
4y ago
❔ How to structure DTOs
C#CC# / help
4y ago
MediatR commands and DTOs [Answered]
C#CC# / help
4y ago