public void UpdateDrink(int type, int quantity) { DrinkDto currentDrink = _drinkRepository.Get(type); if (currentDrink.Quantity < quantity) { throw new NotEnoughSugarException(); } currentDrink.Quantity -= quantity; _drinkRepository.Store(currentDrink); }