コード例 #1
0
 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);
     });
 }
コード例 #2
0
 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));
     }
 }