public int AddUser() { Stream _postData = Request.InputStream; StreamReader _sRead = new StreamReader(_postData); string _userStr = _sRead.ReadToEnd(); return(_server.Add(_userStr)); }
public async Task <ActionResult <User> > PostUser(User user) { await _IUserServer.Add(user); return(CreatedAtAction("GetUser", new { id = user.Id }, user)); }