1
I have an Asp.Net Core MVC project in which I am developing an Accounts Receivable. The whole project uses the DDD concept.
I need to create a function to reorder the sequence of parcel records in the database, when a certain parcel is deleted in the database. Should I create, in the infrastructure layer, a function (eg bool reorder Patches(int id)) similar to the ones that already exist in CRUD (eg: Ienumerable Getall(), Getbyid()) or should create this in the Domain layer (eg: Commandhandler)?
Thank you :)
I’m following Eduardo Pires' model: link
Man, I believe that creating a new command is the right one, but it depends a lot, in the reorganization roll rules of business? Sometimes it is not worth creating a new command if it is just to call an update. (Thinking that delete you already have a command)
– Marccus Zavadzki
Well thought @ Marccus Zavadzki! By making the exclusion, I can do the reorganization from there, because I will already be in Command anyway! If I need to create some function to perform this routine later, then yes, it would be feasible to create a command :)
– Master JR
This, I understand that there is never a certain, everything depends on the context, as Eduardo Pires himself says
– Marccus Zavadzki
I fully agree! As the system grows, several needs arise and doubts increase. It was really nice to exchange that idea with you. Thank you :)
– Master JR
Comments as an answer that I will define as a solution to the question :)
– Master JR
I say the same! It’s always good to discuss structures... I answered here!
– Marccus Zavadzki