Beispiel #1
0
        public IActionResult GetStudentGradesMeans()
        {
            var userId = 0;

            if (Int32.TryParse(HeaderValueReader.GetUserId(Request), out userId))
            {
                var means = facultyService.CalculateStudentMeans(userId);
                return(Ok(mapper.Map <IEnumerable <GradesMeanModel> >(means)));
            }
            return(BadRequest(new { message = "Something went wrong when trying to get student grades means" }));
        }