public void UpdateLock(MetaUrlUpdateLockRequest model) { DataProvider.ExecuteNonQuery("dbo.MetaOT_UpdateLock" , inputParamMapper : delegate(SqlParameterCollection paramCollection) { paramCollection.AddWithValue("@Id", model.Id); paramCollection.AddWithValue("@IsLocked", Convert.ToByte(model.IsLocked)); }); }
public HttpResponseMessage UpdateLock(MetaUrlUpdateLockRequest model) { if (!ModelState.IsValid) { return(Request.CreateErrorResponse(HttpStatusCode.BadRequest, ModelState)); } try { _metaUrlService.UpdateLock(model); return(Request.CreateResponse(HttpStatusCode.OK, new SuccessResponse())); } catch (Exception ex) { return(Request.CreateErrorResponse(HttpStatusCode.BadRequest, ex)); } }