Exemplo n.º 1
0
        public async Task <ActionResult <IEnumerable <SlideShowViewModel> > > Index()
        {
            IEnumerable <SlideShowViewModel> getAllSlideShow = _iMapper.Map <IEnumerable <SlideShowViewModel> >
                                                                   (await _iSlideShowManager.GetAll());

            return(View(getAllSlideShow));
        }
        public async Task <IViewComponentResult> InvokeAsync()
        {
            IEnumerable <SlideShow> slideShows = await _iSlideShowManager.GetAll();

            slideShows = slideShows.Where(sh => sh.Status == true).ToList();
            return(View(slideShows));
        }
Exemplo n.º 3
0
        public IActionResult Index()
        {
            if (HttpContext.Session.GetString("AdminId") != null)
            {
                ICollection <SlideShow> slideShowList = _iSlideShowManager.GetAll();
                return(View(slideShowList));
            }

            return(RedirectToAction("Index", "Login"));
        }
Exemplo n.º 4
0
        public IViewComponentResult Invoke()
        {
            ICollection <SlideShow> slideShowList = _iSlideShowManager.GetAll().Where(s => s.Status == true).ToList();

            return(View(slideShowList));
        }