I have one Sell Operation object and two Buy Operation objects, i want to implement such behavior that one Sell Operation discharges two Buy Operation, it looks like:
sellOperation.Discharge(oneBuyOperation); sellOperation.Discharge(twoBuyOperation);
so i want to ask whether i should call the repository function in the Discharge method, or i'd better call the repository save method outside Discharge method.
like:
opRepository.Save(sellOpertion);
So anyone could give me some advise what are you going to implement in this scenario? using Service class or anything better way?