Exemple #1
0
        public async Task CreateTeacher([FromBody] CreateTeacherRequest request)
        {
            var student = await _userService.GetUserByIdAsync(request.id);

            await _userService.CreateTeacher(student);
        }
        public ActionResult AddTeacher(CreateTeacherRequest createRequest)
        {
            var newTeacher = _teacherRepository.AddTeacher(createRequest.FirstName, createRequest.LastName, createRequest.Grade);

            return(Created($"/api/teacher/{newTeacher.Id}", newTeacher));
        }