예제 #1
0
        public IActionResult Update(int id, [FromBody] User value)
        {
            if (value is null)
            {
                return(BadRequest("value is null."));
            }

            var User = UserContract.Find(id);

            if (User == null)
            {
                return(NotFound("User record couldn't be found."));
            }

            if (!ModelState.IsValid)
            {
                return(BadRequest());
            }


            UserContract.Update(value);
            return(new NoContentResult());
        }