Exemple #1
0
        public async Task <ActionResult <Student> > PostStudent(Student student)
        {
            StudentBUS studentBUS = new StudentBUS(_context);
            var        result     = await studentBUS.CreateStudent(student);

            if (result.ErrorCode == HttpStatusCode.Conflict.ToString())
            {
                return(NotFound());
            }
            return(CreatedAtAction("GetStudent", new { id = student.StudentID }, student));
        }