示例#1
0
        public int AddUser()
        {
            Stream       _postData = Request.InputStream;
            StreamReader _sRead    = new StreamReader(_postData);
            string       _userStr  = _sRead.ReadToEnd();

            return(_server.Add(_userStr));
        }
示例#2
0
        public async Task <ActionResult <User> > PostUser(User user)
        {
            await _IUserServer.Add(user);

            return(CreatedAtAction("GetUser", new { id = user.Id }, user));
        }