public HttpResponseMessage BuscarFornecedorList([FromBody] FornecedorFiltro fornecedorFiltro) { try { return(Request.CreateResponse(HttpStatusCode.OK, FornecedorNeg.BuscarFornecedorList(fornecedorFiltro))); } catch (Exception ex) { return(Request.CreateErrorResponse(HttpStatusCode.BadRequest, ex.Message)); } }
public HttpResponseMessage CadastrarFornecedor([FromBody] Fornecedor fornecedor) { try { return(Request.CreateResponse(HttpStatusCode.OK, FornecedorNeg.CadastrarFornecedor(fornecedor))); } catch (Exception ex) { return(Request.CreateErrorResponse(HttpStatusCode.BadRequest, ex.Message)); } }