dotnut
dotnut
CC#
Created by dotnut on 8/9/2023 in #help
❔ comples object creation
Hi people, Can someone give me some ideas on how to handle a complex object creation, meaning some of properties are objects which themselves and are pretty tricky to create too, one of which even requires data from an I/O operation for which I consider injecting a service for. If I instantiate the properties in the constructor the constructor itself becomes quite huge. I tried the builder pattern but not too fond of it.
11 replies
CC#
Created by dotnut on 12/16/2022 in #help
✅ Design decision over multiple inserts in a single command
Hi, any design suggestions on how to handle an update command from a mvc form which update needs to update 4 different tables? One way is to have a single handler that does all and thus controller invokes a single update service Another is to have multiple handlers to support each table update. In order to achieve SRP the latter seems alright, but I am uncertain as the update command I see as an atomic operation
15 replies