Exemplo n.º 1
0
 public AddMovementResponse Add(AddMovementRequest request)
 {
     try
     {
         var response = new AddMovementResponse();
         var bc       = new MovementComponent();
         response.Result = bc.Add(request.Movement);
         return(response);
     }
     catch (Exception ex)
     {
         var httpError = new HttpResponseMessage()
         {
             StatusCode   = (HttpStatusCode)422,
             ReasonPhrase = ex.Message
         };
         throw new HttpResponseException(httpError);
     }
 }