public async Task <EnglishTaskStatistic> GetByUserId(Guid userId) { var completedEnglishTasks = await _completedEnglishTaskRepository.FindAllByUserId(userId); var domainTasks = _mapper.Map <IReadOnlyList <CompletedEnglishTask> >(completedEnglishTasks); return(new EnglishTaskStatistic(domainTasks)); }
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 <CompletedEnglishTaskModel> > FindAllByUserId(Guid id) { var entities = await _repository.FindAllByUserId(id); return(_mapper.Map <IReadOnlyList <CompletedEnglishTaskModel> >(entities)); }