public HttpResponseMessage UpdateAboutMe(AboutMeUpdateRequest model)
        {
            if (!ModelState.IsValid)
            {
                return Request.CreateErrorResponse(HttpStatusCode.BadRequest, ModelState);
            }

            string userId = _userService.GetCurrentUserId();

            _userService.UpdateAboutMe(model, userId);

            SuccessResponse response = new SuccessResponse();

            return Request.CreateResponse(HttpStatusCode.OK, response);
        }
Ejemplo n.º 2
0
        public void UpdateAboutMe(AboutMeUpdateRequest model, string userId)
        {
            DataProvider.ExecuteNonQuery(GetConnection, "dbo.Users_UpdateAboutMe"
               , inputParamMapper: delegate (SqlParameterCollection paramCollection)
               {
                   paramCollection.AddWithValue("@AboutMe", model.AboutMe);
                   paramCollection.AddWithValue("@UserId", userId);
               }

               , returnParameters: delegate (SqlParameterCollection param)
               {
               }
               );
        }