示例#1
0
        public void CalculatePrice(Order order)
        {
            var customer = _customerRepo.GetById(order.CustomerId);

            if (customer != null && customer.IsCouponHolder)
            {
                order.Price = 799.2;
            }
        }
示例#2
0
        private bool IsGoldenCustomer(Guid customerId)
        {
            var customer = _customerRepo.GetById(customerId);

            if (customer != null && customer.Rating == 5)
            {
                return(true);
            }
            return(false);
        }
示例#3
0
 public tCustomer GetById(int id)
 {
     return(customerRepo.GetById(id));
 }