public CouponEntity GetById(long tid) { var result = _unitOfWork.CouponRepository.GetByID(tid); if (result != null) { var resultModel = GsMapperConfig.CouponMapper(result); return(resultModel); } return(null); }
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); }