Пример #1
0
        public IHttpActionResult GetTeacherById(int teacherId)
        {
            var user = IdentityHelper.GetLoggedInUser(RequestContext);

            logger.Info("User {@userData} is requesting a teacher by Id {teacherId}", user, teacherId);

            var teacher = teachersService.GetTeacherByIdDto(teacherId);

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

            return(Ok(teacher));
        }