Beispiel #1
0
        public ActionResult Put([FromBody] Student student)
        {
            String error;

            if (StudentUtility.checkForValidStudent(out error, student))
            {
                Object  result   = StudentTable.updateStudent(student);
                Student student1 = result as Student;
                if (null != student1)
                {
                    return(Ok(result));
                }
                else
                {
                    return(NotFound(result));
                }
            }
            else
            {
                return(NotFound(new ErrorText(error)));
            }
        }