public async Task <IActionResult> CampaignSliderList()
        {
            var campaignSliders = await _campaignSliderService.GetCampaingList();

            var campaignSliderResources = _mapper.Map <IEnumerable <CampaignSlider>, IEnumerable <CampaignSliderViewModel> >(campaignSliders);

            return(View(campaignSliderResources));
        }
Esempio n. 2
0
        public async Task <IActionResult> Index()
        {
            var campaignSliders = await _campaignSliderService.GetCampaingList();

            var campaignSliderResources = _mapper.Map <IEnumerable <CampaignSlider>, IEnumerable <CampaignSliderViewModel> >(campaignSliders);
            var homePageVM = new HomePageViewModel();

            homePageVM.CampaignSliderViewModels = campaignSliderResources.ToList();
            return(View(homePageVM));
        }