public IHttpActionResult GetGradesById(int id) { logger.Info("Getting grade byId"); GradeDTOOutGet grades = gradesService.GetGradesById(id); return(Ok(grades)); }
public static GradeDTOOutGet GradeDTOConverter(Grade x) { GradeDTOOutGet gradeDTO = new GradeDTOOutGet() { Id = x.Id, GradeYear = x.GradeYear, Subjects = x.Subjects.Select(k => SimpleDTOConverter <SubjectDTO>(k)), Departments = x.Departments.Select(p => SimpleDTOConverter <DepartmentDTOStudent>(p)) }; return(gradeDTO); }