public async IAsyncEnumerable <MarkDto> GetMarksForTimeByLessonByStudentId(int studentId, int lessonId, DateTime startDate, DateTime endDate) { await foreach (var mark in _repository.GetMarksByLessonForStudent(studentId, lessonId, startDate, endDate)) { yield return(mark.ToDto()); } }