예제 #1
0
        public bool PlaceOrder(Order order, int customerId)
        {
            if (order.Amount == 0)
            {
                return(false);
            }

            Customer customer = _customerRepository.Load(customerId);

            if (customer == null)
            {
                return(false);
            }

            order.VAT = Vat.Get(customer.Country);

            _orderRepository.Save(order);

            return(true);
        }