IMO, there should be a method call Sell on the Customization type which decreases InventoryLevel and increases NumberSold atomically. This would be a better way to encapsulate the logic that you want to expose with your model and prevents that someone increases NumberSold without decreasing the inventorylevel
IMO, there should be a method call
Sell
on theCustomization
type which decreases InventoryLevel and increases NumberSold atomically. This would be a better way to encapsulate the logic that you want to expose with your model and prevents that someone increases NumberSold without decreasing the inventorylevel_Originally posted by @fgheysels