File tree Expand file tree Collapse file tree
HwProj.Common/HwProj.Models/SolutionsService
HwProj.SolutionsService/HwProj.SolutionsService.API/Controllers Expand file tree Collapse file tree Original file line number Diff line number Diff 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}
Original file line number Diff line number Diff 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 )
You can’t perform that action at this time.
0 commit comments