Exemplo n.º 1
0
        public async Task <EnglishMultimediaStatistic> GetByUserId(Guid userId)
        {
            var completedEnglishMultimedias = await _completedEnglishMultimediaRepository.FindAllByUserId(userId);

            var domainMultimedias = _mapper.Map <IReadOnlyList <CompletedEnglishMultimedia> >(completedEnglishMultimedias);

            return(new EnglishMultimediaStatistic(domainMultimedias));
        }
        public async Task <GeneralStatistic> GetByUserId(Guid userId)
        {
            var completedEnglishMultimedias = await _completedEnglishMultimediaRepository.FindAllByUserId(userId);

            var completedEnglishTasks = await _completedEnglishTaskRepository.FindAllByUserId(userId);

            var domainMultimedias = _mapper.Map <IReadOnlyList <CompletedEnglishMultimedia> >(completedEnglishMultimedias);
            var domainTasks       = _mapper.Map <IReadOnlyList <CompletedEnglishTask> >(completedEnglishTasks);

            var generalStatistic = new GeneralStatistic(domainMultimedias, domainTasks);

            return(generalStatistic);
        }
Exemplo n.º 3
0
        public async Task <IReadOnlyList <CompletedEnglishMultimediaModel> > FindAllByUserId(Guid id)
        {
            var entities = await _repository.FindAllByUserId(id);

            return(_mapper.Map <IReadOnlyList <CompletedEnglishMultimediaModel> >(entities));
        }