public HttpResponseMessage AlterarValorDeCusto([FromBody] EstoqueContabil obj) { var context = new CentralContext(); _repository = new EstoqueContabilRepository(context); _repositoryLog = new LogAlteracaoCustoRepository(context); _service = new EstoqueContabilService(_repository, _repositoryLog); try { _service.AlterarValorDeCusto(obj); } catch (Exception ex) { return(Request.CreateResponse <dynamic>(HttpStatusCode.InternalServerError, new { Error = ex.Message })); } return(Request.CreateResponse(HttpStatusCode.OK)); }
public void AlterarValorDeCusto(EstoqueContabil obj) { _service.AlterarValorDeCusto(obj); }