Esempio n. 1
0
        public IHttpActionResult CreateUser([FromBody] User user)
        {
            if (user == null)
            {
                return(BadRequest());
            }

            User result = db.InsertUser(user);

            result.Password = "";

            if (result != null)
            {
                return(CreatedAtRoute("GetUser", new { id = result.ID }, result));
            }

            return(Conflict());
        }