Replies: 3 comments
-
Hi, You would probably want to have a copy of the enum in the dto project as well and explicitly define the value ( 1,2,3 ) of each option of the enum. And later you can map this enum via the default adapt extension of mapster. I guess that should work. Have you tried this? What else have you tried till now? |
Beta Was this translation helpful? Give feedback.
0 replies
-
Hi Mukesh, Yes this would work but this would duplicate the enum :(. |
Beta Was this translation helpful? Give feedback.
0 replies
-
You don’t want to reference the domain project if your planning on using the shared project in a client app like blazor. Just defined the enum in the shared project and your domain project can reference the shared project
…________________________________
From: RHaughton ***@***.***>
Sent: Tuesday, November 30, 2021 10:58:32 AM
To: fullstackhero/dotnet-webapi-boilerplate ***@***.***>
Cc: Subscribed ***@***.***>
Subject: Re: [fullstackhero/dotnet-webapi-boilerplate] Reference Domain from Shared.DTOs project??? (Discussion #214)
Hi Mukesh,
Yes this would work but this would duplicate the enum :(.
For now I have referenced the domain project from the shared Dto project.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub<#214 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AALFFSIVPW7UG4W24EIDYATUOTYCRANCNFSM5JBF334Q>.
|
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
RHaughton
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi Mukesh,
I'm having an issue with this new architecture.
Let's say I have a ProductType enum in my domain project.
I also have my CreateProductRequest in my Shared.DTOs project.
What would be the correct way to reference said enum in my CreateProductRequest since Shared.DTOs project doesn't have a reference to the Domain ??
Should I just reference the domain in the shared.DTOs folder?
Thanks for your help
Beta Was this translation helpful? Give feedback.
All reactions