Ejemplo n.º 1
0
 public HttpResponseMessage Update(CategoryViewModel model)
 {
     try
     {
         this.categoryService.Update(model.Category);
     }
     catch (ValidationException ex)
     {
         return(WebApiValidationHelper.ToResponseCode(ex));
     }
 }
Ejemplo n.º 2
0
 protected override async Task <HttpResponseMessage> SendAsync(
     HttpRequestMessage request, CancellationToken cancellationToken)
 {
     try
     {
         return(await base.SendAsync(request, cancellationToken));
     }
     catch (ValidationException ex)
     {
         return(WebApiValidationHelper.ToResponseCode(ex));
     }
 }