public BannersQueryResponse GetActiveBanners(BannersQueryRequest queryRequest)
        {
            var response = new BannersQueryResponse();

            try
            {
                var bannerDto = _cacheManager.Retrieve <PagingQueryResponse <BannerDto> >("ActiveBanners");

                if (bannerDto != null)
                {
                    response.Banners = bannerDto;
                    return(response);
                }

                var banners = _bannerRepository.GetActiveBanners(queryRequest);

                if (banners.Result == null)
                {
                    response.Message = BannerQueryMessage.NoBannerFound;
                    return(response);
                }

                bannerDto = Mapper.Map <PagingQueryResponse <Banner>, PagingQueryResponse <BannerDto> >(banners);
                _cacheManager.Store("ActiveBanners", bannerDto);
                return(response);
            }
            catch (Exception exception)
            {
                response.Failed = true;
                _logger.Error(exception);
            }

            return(response);
        }
        public BannersQueryResponse GetInactiveBanners(BannersQueryRequest request)
        {
            var response = new BannersQueryResponse();

            try
            {
                var banners = _bannerRepository.GetInactiveBanners(request);

                if (banners.Result == null)
                {
                    response.Message = BannerQueryMessage.NoBannerFound;
                    return(response);
                }

                response.Banners = Mapper.Map <PagingQueryResponse <Banner>, PagingQueryResponse <BannerDto> >(banners);
            }
            catch (Exception exception)
            {
                response.Failed = true;
                _logger.Error(exception);
            }

            return(response);
        }