public IActionResult Index(string searchCode, string searchDescription) { var coupons = _repos.GetAllCoupons(searchCode, searchDescription); var model = CouponModelFactory.CreateCouponIndex(coupons); return(Ok(model)); }
public void GetAllCoupons() { _couponRepository.GetAllCoupons(); }
public IEnumerable <CouponDto> GetAllCoupons() { var couponEntities = _couponRepository.GetAllCoupons(); return(_dtoMapper.Map(couponEntities)); }