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)); }
public IActionResult Index() { if (HttpContext.Session.GetString("AdminId") != null) { ICollection <SlideShow> slideShowList = _iSlideShowManager.GetAll(); return(View(slideShowList)); } return(RedirectToAction("Index", "Login")); }
public IViewComponentResult Invoke() { ICollection <SlideShow> slideShowList = _iSlideShowManager.GetAll().Where(s => s.Status == true).ToList(); return(View(slideShowList)); }