Beispiel #1
0
        public CouponEntity GetById(long tid)
        {
            var result = _unitOfWork.CouponRepository.GetByID(tid);

            if (result != null)
            {
                var resultModel = GsMapperConfig.CouponMapper(result);
                return(resultModel);
            }
            return(null);
        }
Beispiel #2
0
        public CouponEntity GetByCouponCode(string couponcode)
        {
            var result = _unitOfWork.CouponRepository.Get(c => (c.couponcode == couponcode && c.cblocked == false));

            if (result != null)
            {
                var resultModel = GsMapperConfig.CouponMapper(result);
                return(resultModel);
            }
            return(null);
        }