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); } }
public T Agregar(T entity) { return(component.Agregar(entity)); }