예제 #1
0
 public AgregarEspecieDto Agregar(AgregarEspecieDto dto)
 {
     try
     {
         var bc = new EspecieComponent();
         dto.Result = bc.Create(dto.Result);
         return(dto);
     }
     catch (Exception ex)
     {
         var httpError = new HttpResponseMessage()
         {
             StatusCode   = (HttpStatusCode)422, // UNPROCESSABLE ENTITY
             ReasonPhrase = ex.Message
         };
         dto.Message = ex.Message;
         throw new HttpResponseException(httpError);
     }
 }
예제 #2
0
        public Especie Create(Especie objeto)
        {
            var bc = new EspecieComponent();

            return(bc.Create(objeto));
        }
예제 #3
0
        public Especie Create(Especie especie)
        {
            EspecieComponent EspecieComponent = new EspecieComponent();

            return(EspecieComponent.Create(especie));
        }