Exemplo n.º 1
0
        public IHttpActionResult GetTeacherByUsername(string username)
        {
            logger.Info("Getting teacher by username, controller");
            TeacherDTOOut teacher = teachersService.GetTeacherByUsername(username);

            return(Ok(teacher));
        }
        public IHttpActionResult GetTeacherByUsername(string username)
        {
            Teacher teacher = service.GetTeacherByUsername(username);

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

            return(Ok(teacher));
        }