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); }
public async Task <IReadOnlyList <CompletedEnglishMultimediaModel> > FindAllByUserId(Guid id) { var entities = await _repository.FindAllByUserId(id); return(_mapper.Map <IReadOnlyList <CompletedEnglishMultimediaModel> >(entities)); }