Exemplo n.º 1
0
        public IHttpActionResult PutNewStudent(Guid id, UserDto student)
        {
            if (ModelState.IsValid != true)
            {
                return(BadRequest(ModelState));
            }
            string result = db.AddNewStudent(id, student, student.Password);

            if (result.Contains("successfully"))
            {
                return(Ok(result));
            }
            return(Content(HttpStatusCode.NotFound, result));
        }