Working in .Net, but I suppose the question applies to any OO language
If you've got a master/detail relationship (say Order and OrderLine)
and the detail object needs info from the master (e.g. customer discount type) what's the best way of propagating the information? I started by passing the values as parameters to the constructor, but it's kinda snowballed, and I'm passing about 10 things now.
Passing the Order object to orderLine doesn't seem right either.
What options are there? I could stick all the parameters in a struct I guess?
TVM
If you've got a master/detail relationship (say Order and OrderLine)
and the detail object needs info from the master (e.g. customer discount type) what's the best way of propagating the information? I started by passing the values as parameters to the constructor, but it's kinda snowballed, and I'm passing about 10 things now.
Passing the Order object to orderLine doesn't seem right either.
What options are there? I could stick all the parameters in a struct I guess?
TVM
Comment