Esempio n. 1
0
        public async Task DeleteCouponAsync(Guid couponId)
        {
            var coupon = await _couponRepo.GetCouponById(couponId);

            if (coupon == null)
            {
                throw new EntityNotFound("Coupon");
            }

            _couponRepo.Detete(coupon);
            await _couponRepo.UnitOfWork.SaveChangesAsync();
        }