Пример #1
0
 public JsonActionResult <Coupon> Add(Coupon entity)
 {
     return(SafeExecute(() =>
     {
         return CouponService.Add(entity);
     }));
 }
Пример #2
0
        public CouponManagerTest()
        {
            var discount = new DiscountOption(DiscountType.Ratio, 10);

            _coupon = new Coupon("X01", 500, discount);

            _couponService = new CouponService(_couponRepository);
            _couponService.Add(_coupon);
        }