public async Task <ActionResult <DiscountRuleREST> > PostDiscountRule(DiscountRuleREST discountRuleREST)
        {
            var discountRuleModel = Mapper.Map <DiscountRule>(discountRuleREST);
            var success           = await DiscountRuleService.CreateAsync(discountRuleModel);

            if (!success)
            {
                return(StatusCode(500));
            }
            return(Ok(success));
        }
        public async Task <ActionResult <bool> > PutDiscountRule(Guid id, DiscountRuleREST discountRuleREST)
        {
            if (id != discountRuleREST.Id)
            {
                return(BadRequest());
            }

            var discountRuleModel = Mapper.Map <DiscountRule>(discountRuleREST);

            bool success = await DiscountRuleService.UpdateAsync(id, discountRuleModel);

            if (!success)
            {
                return(NoContent());
            }
            return(Ok(success));
        }