public TipoServicioResponse Agregar(TipoServicioRequest request)
 {
     try
     {
         var response = new TipoServicioResponse();
         var bc       = new TipoServicioComponent();
         response.Result = bc.Add(request.TipoServicio);
         return(response);
     }
     catch (Exception ex)
     {
         var httpError = new HttpResponseMessage()
         {
             StatusCode   = (HttpStatusCode)422,
             ReasonPhrase = ex.Message
         };
         throw new HttpResponseException(httpError);
     }
 }
Ejemplo n.º 2
0
        public TipoServicio Add(TipoServicio tipoServicioComponent)
        {
            var bc = new TipoServicioComponent();

            return(bc.Add(tipoServicioComponent));
        }