public void updateBackgroundPicture(updateUserBackgroundPicture model) { DataProvider.ExecuteNonQuery(GetConnection, "dbo.UpdateUserBackgroundMedia" , inputParamMapper : delegate(SqlParameterCollection paramCollection) { paramCollection.AddWithValue("@bgmediaId", model.bgmediaId); paramCollection.AddWithValue("@userId", model.userId); } ); }
public HttpResponseMessage updateUserBackground(updateUserBackgroundPicture model) { if (!ModelState.IsValid) { return(Request.CreateErrorResponse(HttpStatusCode.BadRequest, ModelState)); } model.userId = UserService.GetCurrentUserId(); _userProfileService.updateBackgroundPicture(model); ItemResponse <bool> response = new ItemResponse <bool>(); response.IsSuccessful = true; return(Request.CreateResponse(HttpStatusCode.OK, response)); }