public JsonActionResult <Coupon> Add(Coupon entity) { return(SafeExecute(() => { return CouponService.Add(entity); })); }
public CouponManagerTest() { var discount = new DiscountOption(DiscountType.Ratio, 10); _coupon = new Coupon("X01", 500, discount); _couponService = new CouponService(_couponRepository); _couponService.Add(_coupon); }