示例#1
0
        public void Post([FromBody] string value)
        {
            UserWithPassword newUser    = JsonConvert.DeserializeObject <UserWithPassword>(value);
            IUserWriter      userWriter = new UserWriter();

            userWriter.CreateUser(newUser);
        }
示例#2
0
        public void Post([FromBody] string value)
        {
            DeleteUserParam delUser    = Newtonsoft.Json.JsonConvert.DeserializeObject <DeleteUserParam>(value);
            IUserWriter     userWriter = new UserWriter();

            userWriter.DeleteUser(delUser);
        }
示例#3
0
        public void Post([FromBody] string value)
        {
            ValidateRequest();
            UserWithPassword newUserDetails = JsonConvert.DeserializeObject <UserWithPassword>(value);
            IUserWriter      iWriter        = new UserWriter();

            if (Convert.ToInt32(this.HttpContext.Request.Headers["UserId"]) == newUserDetails.Id)
            {
                iWriter.UpdatePassword(newUserDetails);
            }
        }