コード例 #1
0
        public IActionResult CreateTeacher([FromBody] Teacher NewObj)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest());
            }

            if (NewObj == null)
            {
                return(BadRequest());
            }

            _teacherRepo.CreateTeacher(NewObj);

            return(NoContent());
        }