Esempio n. 1
0
        public TResponse Agregar(TRequest request)
        {
            try
            {
                var result = new TResponse();
                result.Result = component.Agregar(request.Request);

                return(result);
            }
            catch (Exception ex)
            {
                var httpError = new HttpResponseMessage()
                {
                    StatusCode   = (HttpStatusCode)422,
                    ReasonPhrase = ex.Message
                };
                throw new HttpResponseException(httpError);
            }
        }
Esempio n. 2
0
 public T Agregar(T entity)
 {
     return(component.Agregar(entity));
 }