public async Task <ActionResult <CouponReadDto> > CreateCoupon(CouponCreateDto couponCreateDto) { var couponModel = _mapper.Map <Coupon>(couponCreateDto); var coupon = await _repository.CreateCoupon(couponModel); return(CreatedAtRoute("GetCoupon", new { id = coupon.Id.ToString() }, _mapper.Map <CouponReadDto>(coupon))); }
public Coupon CreateCoupon(int value, string userId) { return(_couponRepo.CreateCoupon(value, userId)); }