public async Task <IList <AssignmentResultDto> > GetResultsForUserAsync(int chapterId, int userId, DateTime?dateUtc) { var assignmentsWithResults = await _testResultRepository.GetLastTestResultsOfChapterAsync(chapterId, userId, dateUtc); return(assignmentsWithResults.Select(a => _assignmentWitResultsConverter.ToAssignmentResultDto(a)).ToList()); }
public async Task <AssignmentResultDto> GetResultsForUserAsync(int exerciseId, int userId, DateTime?dateUtc) { var assignmentWithLastResultsOfUser = await _testResultRepository.GetLastTestResultsOfExerciseAsync(exerciseId, userId, dateUtc); return(_assignmentWitResultsConverter.ToAssignmentResultDto(assignmentWithLastResultsOfUser)); }