I have one Sell Operation object and two Buy Operation objects, I want to implement such a behavior that one Sell operation performs two Buy operations, it looks like this:
sellOperation.Discharge (oneBuyOperation);
sellOperation.Discharge (twoBuyOperation);
so I want to ask if I should call the repository function in the "discharge" method, or should I call the method of saving the repository outside the "Unload" method. as:
opRepository.Save (sellOpertion);
So, can anyone give me some advice on what you are going to implement in this scenario? using a service class or something better?
source
share