Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why Envelope return Domain object? #36

Open
marcrib opened this issue Jun 28, 2018 · 5 comments
Open

Why Envelope return Domain object? #36

marcrib opened this issue Jun 28, 2018 · 5 comments

Comments

@marcrib
Copy link

marcrib commented Jun 28, 2018

Why Envelope return Domain object?

Is bad practices

@adamhathcock
Copy link
Collaborator

Says whom?

One of the goals of Feature orientation is to reduce needless layers of abstraction. Validation for web and db occurs via MediatR pipelining

@marcrib
Copy link
Author

marcrib commented Jun 29, 2018

@adamhathcock hi, there may be circular properties and also properties that I do not want to return.
Using JsonIgnore seems to mess up the application domain

@adamhathcock
Copy link
Collaborator

If you need to make a DTO then do it. Only do what you need to. Be agile. Don’t make layers for no reason.

Using a serialization attribute doesn’t mess up a domain.

@Deilan
Copy link

Deilan commented Jul 17, 2018

@adamhathcock How to leverage DTO-approach with MediatR, AutoMapper and FluentValidation? Could you kindly provide a sample or point into appropriate direction?

@aarrttzz
Copy link

aarrttzz commented Mar 2, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants