Beispiel #1
0
        public List <SlideViewModel> GetAll()
        {
            var slides          = _slideRepository.FindAll();
            var slideViewModels = slides.ProjectTo <SlideViewModel>().ToList();

            return(slideViewModels);
        }
 public List <SlideViewModel> GetSlides(string groupAlias)
 {
     return(_slideRepository.FindAll(x => x.Status && x.GroupAlias == groupAlias)
            .ProjectTo <SlideViewModel>().ToList());
 }
Beispiel #3
0
        public List <SlideViewModel> GetSlides(string groupAlias, int top = 5)
        {
            IQueryable <Slide> slides = slideRepository.FindAll(x => x.Status && x.GroupAlias == groupAlias);

            return(slides.OrderBy(x => x.DisplayOrder).Take(top).ProjectTo <SlideViewModel>().ToList());
        }
Beispiel #4
0
 public List <SlideViewModel> GetSlides(string groupAlias)
 {
     return(_slideRepository.FindAll(x => x.Status && x.GroupAlias == groupAlias)
            .ProjectTo <SlideViewModel>(_mapper.ConfigurationProvider).ToList());
 }
Beispiel #5
0
 public async Task <List <SlideViewModel> > GetAll()
 {
     return(new SlideViewModel().Map((await _slideRepository.FindAll()).AsNoTracking().AsParallel().AsOrdered().WithDegreeOfParallelism(2)).ToList());
 }
Beispiel #6
0
 public async Task <List <SlideViewModel> > GetSlides(string groupAlias)
 {
     return(new SlideViewModel().Map(await _slideRepository.FindAll(x => x.Status && x.GroupAlias == groupAlias)).ToList());
 }
Beispiel #7
0
 public List <SlideViewModel> GetSlides()
 {
     return(_slideRepository.FindAll(x => x.Status)
            .ProjectTo <SlideViewModel>().ToList());
 }