Exemplo n.º 1
0
 public void Update(HelpCategoriesUpdateRequest model)
 {
     DataProvider.ExecuteNonQuery("dbo.HelpCategories_Update"
                                  , inputParamMapper : delegate(SqlParameterCollection paramCollection)
     {
         paramCollection.AddWithValue("@Id", model.Id);
         paramCollection.AddWithValue("@Name", model.Name);
         paramCollection.AddWithValue("@UrlPath", model.UrlPath);
         paramCollection.AddWithValue("@ModifiedBy", model.ModifiedBy);
     });
 }
Exemplo n.º 2
0
 public HttpResponseMessage Update(HelpCategoriesUpdateRequest model)
 {
     if (!ModelState.IsValid)
     {
         return(Request.CreateErrorResponse(HttpStatusCode.BadRequest, ModelState));
     }
     try
     {
         _helpCategoriesService.Update(model);
         return(Request.CreateResponse(HttpStatusCode.OK, new SuccessResponse()));
     }
     catch (Exception ex)
     {
         return(Request.CreateResponse(HttpStatusCode.BadRequest, ex));
     }
 }