Exemplo n.º 1
0
        // POST: api/Student
        public IHttpActionResult Post([FromBody] Student value)
        {
            bool isValid = ModelState.IsValid;

            if (StudentStorage.AddStudentToList(value))
            {
                return(Created("Added successfully", value));
            }
            return(BadRequest("Please enter a student with a valid grade"));
        }