public void Update(ConfigDataUpdateRequest model) { DataProvider.ExecuteNonQuery("dbo.ConfigType_Update" , inputParamMapper : delegate(SqlParameterCollection paramCollection) { paramCollection.AddWithValue("@Id", model.Id); paramCollection.AddWithValue("@DisplayName", model.DisplayName); paramCollection.AddWithValue("@Description", model.Description); paramCollection.AddWithValue("@ModifiedBy", model.ModifiedBy); }); }
public HttpResponseMessage Update(ConfigDataUpdateRequest model) { try { if (!ModelState.IsValid) { return(Request.CreateErrorResponse(HttpStatusCode.BadRequest, ModelState)); } _configDataService.Update(model); return(Request.CreateResponse(HttpStatusCode.OK, new SuccessResponse())); } catch (Exception ex) { return(Request.CreateResponse(HttpStatusCode.BadRequest, ex)); } }