public void ChangeUserDisableStatus(UpdateDisableStatusRequest model) { Action <SqlParameterCollection> inputParamDelegate = delegate(SqlParameterCollection paramCollection) { paramCollection.AddWithValue("@ChangeStatus", model.Disabled); paramCollection.AddWithValue("@Id", model.Id); }; _dataProvider.ExecuteNonQuery("dbo.Users_EnableDisableUser", inputParamDelegate); }
public HttpResponseMessage ChangeDisableStatus(UpdateDisableStatusRequest request) { if (!ModelState.IsValid) { return(Request.CreateErrorResponse(HttpStatusCode.BadRequest, ModelState)); } _userService.ChangeUserDisableStatus(request); return(Request.CreateResponse(HttpStatusCode.OK, new GSwap.Models.Responses.SuccessResponse())); }