Skip to content

Commit ff393ae

Browse files
committed
wip
1 parent ab8f573 commit ff393ae

2 files changed

Lines changed: 15 additions & 15 deletions

File tree

HwProj.Common/HwProj.Models/SolutionsService/StudentSolutionsTableDto.cs

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,18 @@ namespace HwProj.Models.SolutionsService
55
public class StudentSolutionsTableDto
66
{
77
public string StudentId { get; set; }
8-
public List<Homework> Homeworks { get; set; }
9-
10-
public class Homework
11-
{
12-
public long Id { get; set; }
13-
public List<Task> Tasks { get; set; } = new List<Task>();
14-
}
15-
16-
public class Task
17-
{
18-
public long Id { get; set; }
19-
public List<SolutionDto> Solutions { get; set; } = new List<SolutionDto>();
20-
}
8+
public List<StudentSolutionsTableHomeworkDto> Homeworks { get; set; }
9+
}
10+
11+
public class StudentSolutionsTableHomeworkDto
12+
{
13+
public long Id { get; set; }
14+
public List<StudentSolutionsTableTaskDto> Tasks { get; set; } = new List<StudentSolutionsTableTaskDto>();
15+
}
16+
17+
public class StudentSolutionsTableTaskDto
18+
{
19+
public long Id { get; set; }
20+
public List<SolutionDto> Solutions { get; set; } = new List<SolutionDto>();
2121
}
2222
}

HwProj.SolutionsService/HwProj.SolutionsService.API/Controllers/SolutionsController.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -223,10 +223,10 @@ public async Task<IActionResult> GetCourseStat(long courseId)
223223
var result = table.Select(x => new StudentSolutionsTableDto
224224
{
225225
StudentId = x.StudentId,
226-
Homeworks = x.Homeworks.Select(h => new StudentSolutionsTableDto.Homework()
226+
Homeworks = x.Homeworks.Select(h => new StudentSolutionsTableHomeworkDto
227227
{
228228
Id = h.Id,
229-
Tasks = h.Tasks.Select(t => new StudentSolutionsTableDto.Task()
229+
Tasks = h.Tasks.Select(t => new StudentSolutionsTableTaskDto
230230
{
231231
Id = t.Id,
232232
Solutions = _mapper.Map<List<SolutionDto>>(t.Solutions)

0 commit comments

Comments
 (0)