Example #1
0
 /// <summary>
 /// Get grades by parameters provided in the queryDto
 /// </summary>
 /// <param name="query"></param>
 /// <returns></returns>
 public IEnumerable <GradeDto> GetGradesByParameters(GradeQueryDto query)
 {
     return(GetGradesByParameters(
                query.GradeId,
                query.CourseId, query.TeacherId, query.ClassRoomId, query.StudentId,
                query.ParentId, query.Semester, query.SchoolGrade, query.Grade, query.FromDate, query.ToDate));
 }
Example #2
0
        public IHttpActionResult GetGradesFromDtoQuery([FromUri] GradeQueryDto query)
        {
            var userData = IdentityHelper.GetLoggedInUser(RequestContext);

            logger.Info("Get Grades for query {@gradeQueryData} by {@userData}", query, userData);

            var grades = gradesService.GetGradesByParameters(query);

            if (grades == null)
            {
                return(NotFound());
            }

            return(Ok(grades));
        }