You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In my projects I've been referencing my Dto project, which is available to the service architecture as a package, in the Core project so that I can return it to the Web project using a service interface. Lately I've been thinking about the referencing Core project in the Dto project so that I can use class methods to create Dto objects from db entities that are more or less identical. This would move a lot of the object creation out of the Core service code and into the Dto classes/files, which would make the code base cleaner and maybe easier to use going forward.
I am mostly reluctant to create dependencies, but it feels logical to do it. I am not looking for an answer, but I would like to hear anyone's take on this and their pros and cons, especially if you have tried it.
Thanks!
Anton
EDIT
Just realized that this would cause a circular dependency. One solution would be to have a separate project that gives that solution.
Still interested to hear your thoughts!
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi!
In my projects I've been referencing my Dto project, which is available to the service architecture as a package, in the Core project so that I can return it to the Web project using a service interface. Lately I've been thinking about the referencing Core project in the Dto project so that I can use class methods to create Dto objects from db entities that are more or less identical. This would move a lot of the object creation out of the Core service code and into the Dto classes/files, which would make the code base cleaner and maybe easier to use going forward.
I am mostly reluctant to create dependencies, but it feels logical to do it. I am not looking for an answer, but I would like to hear anyone's take on this and their pros and cons, especially if you have tried it.
Thanks!
EDIT
Just realized that this would cause a circular dependency. One solution would be to have a separate project that gives that solution.
Still interested to hear your thoughts!
Beta Was this translation helpful? Give feedback.
All reactions