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); } }
public Especie Create(Especie objeto) { var bc = new EspecieComponent(); return(bc.Create(objeto)); }
public Especie Create(Especie especie) { EspecieComponent EspecieComponent = new EspecieComponent(); return(EspecieComponent.Create(especie)); }