Example #1
0
        public IHttpActionResult GetGradesById(int id)
        {
            logger.Info("Getting grade byId");
            GradeDTOOutGet grades = gradesService.GetGradesById(id);

            return(Ok(grades));
        }
Example #2
0
        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);
        }